on 07-08-2016 10:37 PM
Experts,
I have a client who needs to have a query report similar to the view when drilling down into the account detail, but with added UDF's.
Here is my query, I believe that I have the joins wrong, but do not know where....
SELECT DISTINCT T0.[DocNum], T0.[CardName], T0.[DocDate], T0.[NumAtCard] AS 'PO ref', T1.[ItemCode], T1.[Quantity], T1.[LineTotal], T0.[U_NBS_GPA_08], T0.[U_NBS_GPA_09], T0.[U_NBS_GPA_10], T0.[U_NBS_GPA_11], T0.[U_NBS_GPA_04], T0.[U_NBS_GPA_05], T0.[U_NBS_GPA_01], T0.[U_NBS_GPA_02], T0.[U_NBS_GPA_03], T0.[ShipToCode], T4.[FormatCode]
FROM OINV T0 INNER JOIN INV1 T1 ON T0.[DocEntry] = T1.[DocEntry] INNER JOIN OJDT T2 ON T0.[TransId] = T2.[TransId] INNER JOIN JDT1 T3 ON T2.[TransId] = T3.[TransId] INNER JOIN OACT T4 ON T0.[CtlAccount] = T4.[AcctCode]
WHERE T4.[AcctName] =[%0]
Your help would be much appreciated.
Marli
Try:
INNER JOIN OACT T4 ON T3.[Account] = T4.[AcctCode] instead of
INNER JOIN OACT T4 ON T0.[CtlAccount] = T4.[AcctCode]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.