tonyvee1973
IS-IT--Management
Hiya
I need to sort some data and have built a query but need to get it right as this wont work. Can someone see where i am going wrong?
Think the issue is where i have put the "where POD_QTYRESERVED>0" is the wrong place as if i delete it the query works ok.
Thanks as always
Select POP_DETAIL.POD_STOCK_CODE,
POP_DETAIL.POD_QTYRESERVED,
POP_DETAIL.POD_REQDATE,
Row_Number() Over (Partition By POD_STOCK_CODE Order By POD_REQDATE DESC) As RowId where POD_QTYRESERVED>0
From POP_DETAIL
I need to sort some data and have built a query but need to get it right as this wont work. Can someone see where i am going wrong?
Think the issue is where i have put the "where POD_QTYRESERVED>0" is the wrong place as if i delete it the query works ok.
Thanks as always
Select POP_DETAIL.POD_STOCK_CODE,
POP_DETAIL.POD_QTYRESERVED,
POP_DETAIL.POD_REQDATE,
Row_Number() Over (Partition By POD_STOCK_CODE Order By POD_REQDATE DESC) As RowId where POD_QTYRESERVED>0
From POP_DETAIL