on 09-14-2021 2:44 PM
Hello, I'm trying to get my special rates up with my request, only I can't find the link that allows to link the OCDR table to the EDG1 table for the moment my request is this:
SELECT OITM.ItemCode, OITM.ItemName, OITM.CodeBars, OITB.ItmsGrpNam, OITW.WhsCode, OITW.OnHand, OITW.OnOrder as 'Purchase order', OITW.IsCommited as 'customer order',
((OITW.OnHand + OITW.OnOrder) -ISNULL ((SELECT SUM (Quantity) from RDR1 where CodeBars = OITM.CodeBars And LineStatus = 'O' and OITW.WhsCode = '01' and Shipdate between GETDATE () and DATEADD ( DAY, 21, CAST (GETDATE () AS DATE))), 0.00)) as 'Virtual Available',
(
SELECT T0.Discount FROM OCRD T0
LEFT JOIN OEDG ON T0.CardCode = OEDG.ObjCode
LEFT JOIN EDG1 ON EDG1.AbsEntry = OEDG.AbsEntry
WHERE T0.CardCode = OITM.CardCode
) as 'Price List Special Prices 2'
FROM [dbo]. [OITM] OITM
INNER JOIN [dbo]. [OITW] OITW ON OITM.ItemCode = OITW.ItemCode
INNER JOIN [dbo]. [OITB] OITB ON OITM.ItmsGrpCod = OITB.ItmsGrpCod
INNER JOIN [dbo]. [OCRD] OCRD ON OITM.CardCode = OCRD.CardCode
WHERE OITW.WhsCode = '01 'and OITW.Locked =' N 'and OITM.QryGroup24 =' Y '
I can't get my rates up
I need help
User | Count |
---|---|
6 | |
3 | |
3 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.