on 03-17-2009 8:09 PM
When I try to create a query with the 3 tables above when I add the CRD1 the invoice numbers begin to duplicate. Is this a problem with the JOIN statements automatically created by the Generator?
Thanks, Jeff
SELECT *
FROM OINV T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
INNER JOIN CRD1 T2 ON T1.CardCode = T2.CardCode
hi,
Query will be
SELECT *
FROM OINV T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
INNER JOIN CRD1 T2 ON T1.CardCode = T2.CardCode and T2.AdresType = 'B'
Jeyakanthan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is because you have more than one records in CRD1. You should not join this table unconditionally.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gordon,
Thank you, I understand that there may be more than one record in CRD1. Is there a JOIN statement possibility I could use to just show the one invoice number from the OINV? I want my query to produce just one line based on the DocNum in OINV, I don't need to duplicate them because of the CRD1 having more than one record.
Thanks, Jeff
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
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.