Skip to Content
Former Member
Apr 26, 2010 at 08:15 AM

purchase price different


Hallow good afternoon all the experts

I have made this query and can work in the branch office A, and my copy at the office of the branch B why can not work?

His description is No data was found as a result of the selection criteria.

if anyone can help me fix my Query

This is my Query

SELECT T1.[DocEntry], T0.[CardCode], T0.[CardName], T0.[DocDate], T1.[ItemCode], T1.[Dscription], T1.[Price], T2.[LastPurPrc]T1.[NumPerMsr] AS 'Last Purchase Price', (T1.[Price] - (T2.[LastPurPrc]T1.[NumPerMsr])) AS 'Variance', (((T1.[Price] - (T2.[LastPurPrc]T1.[NumPerMsr]))/(T2.[LastPurPrc]T1.[NumPerMsr]))*100) AS 'Variance%', T3.[SlpName]

FROM OPDN T0 INNER JOIN PDN1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OSLP T3 ON T0.SlpCode = T3.SlpCode WHERE (T2.[LastPurPrc] > 0) AND Month(T0.[DocDate]) = Month(Getdate()) AND Year(T0.[Docdate]) = Year(Getdate()) AND (((T1.[PriceBefDi] - (T2.[LastPurPrc]T1.[NumPerMsr]))/(T2.[LastPurPrc]T1.[NumPerMsr]))*100) > 5