Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 9057

SQL Show GP's and Price list and if exist the special price with reference to ItemCode

$
0
0

Hi,

 

I need a table wich show me from all GP's the Item price form ITM1.[Pricelist] = 1 and if exist the special price (OSPP.[Price])

So the ItemCode should be changeable (ITM1.[ItemCode] = [%ItemCode])

 

I have already this code:

 

SELECT T1.[CardCode], T1.[CardName], T2.[ItemName], T0.[Discount], T0.[Price] as 'Special Price', ISNULL(T3.[Price],0) as 'Normal Price', T0.[Currency]

FROM OSPP T0  INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode

INNER JOIN OITM T2 ON T0.ItemCode = T2.ItemCode

INNER JOIN ITM1 T3 ON T0.ItemCode = T3.ItemCode

WHERE T0.[ItemCode]  = [%ItemCode]

AND T3.[Pricelist] = 1

 

But the problem is, that it doesn't show all Customers.

 

Who can help?

 

THX


Viewing all articles
Browse latest Browse all 9057

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>