Home > database >  Please see the following syntax is correct
Please see the following syntax is correct

Time:11-01

The select Max (count_od_qty)
The from (
Select count (od. Qty) as count_od_qty
The from odetails od, order1 o
Where od. Ono=o.o no
Group by o. chua no, od. Pno
)

System has been prompt
Msg 102, Level 15, State 1, Line 7
Incorrect syntax near the ') '.

I just started to learn, also please tell Daniel,

CodePudding user response:

Need to add an alias
 

The select Max (count_od_qty)
The from (
Select count (od. Qty) as count_od_qty
The from odetails od, order1 o
Where od. Ono=o.o no
Group by o. chua no, od. Pno
) a


  • Related