Hi,
Is there a way to use distinct with joins?
at the moment I have something like:
SELECT *
FROM A, B, C, D
WHERE A.foo= B.foo
AND A.bar = C.bar
AND C.xyz = D.xyz
and it gets all the records I need, but also some variations of records (they are alternate spellings for a particular object). One of the columns can be used by itself, as in:
SELECT DISTINCT column FROM C
which eliminates the duplicates. But I can't figure out a way to get it to work together with the JOINS. is that not allowed because it is run as a sort of sub-query?
thanks for any ideas,
LEX
Is there a way to use distinct with joins?
at the moment I have something like:
SELECT *
FROM A, B, C, D
WHERE A.foo= B.foo
AND A.bar = C.bar
AND C.xyz = D.xyz
and it gets all the records I need, but also some variations of records (they are alternate spellings for a particular object). One of the columns can be used by itself, as in:
SELECT DISTINCT column FROM C
which eliminates the duplicates. But I can't figure out a way to get it to work together with the JOINS. is that not allowed because it is run as a sort of sub-query?
thanks for any ideas,
LEX