Skip to Content
0
Former Member
Jul 21, 2016 at 12:32 PM

Latest sales price query from ODLN

36 Views

Hi Experts,

I want the delivery report with only the latest date lines . I tried the below query, but it is wrong

SELECT max(t0.[DocDate]), T1.[ItemCode], case when T1.[Price]=0 then t1.stockprice else T1.[Price] END as'Latest selling price'

FROM ODLN T0 INNER JOIN DLN1 T1 ON T0.[DocEntry] = T1.[DocEntry]

Order by T1.[ItemCode],T1.[Price],t1.stockprice

could any one help me to fix this

Regards,

Dwaraka