Skip to Content
Former Member
Sep 26, 2008 at 10:10 AM

query problem


hi there again,

as i asked i write a query for udf´s in business partners like this one :

SELECT T0.[CardCode],T0.[U_altekdnr], T2.[Descr], T3.[Descr], T1.[Country] FROM .[OCRD] T0 INNER JOIN UFD1 T2 ON T2.FldValue = T0.U_gruppe INNER JOIN CRD1 T1 ON T0.CardCode = T1.CardCode AND T1.Address = 'Standard RE' INNER JOIN UFD1 T3 ON T3.FldValue = T0.U_kundenart WHERE T0.U_gruppe = AND T0.U_kundenart =

The problem is that i get each CardCord entry repeated for each table. e.g. CardCode 1 is twice in OCRD, once in CRD1 and twice in UFD1, the result is 5 lines with CardCode 1.

But i only want one result line. The statement DISTINCT does not help. Any ideas ?