SQL Help

D

David

Hello,

I am trying to run a join query, which yields 10 fields and which joins 2
tables, 1 table is the one, the other contains the "many".

I want to only grab the first record containing duplicate key field value
from the many table. However, the DISTINCT clause evaluates the entire
record, not just the key field.

Any ideas?
 
K

Klatuu

DISTINCT does not evaluate the entire record. It only evaluates the fields
in the SELECT statement. I think what you want is DISTINCTROW.
 
D

David

Thanks for your response.

What I meant by the entire record ARE the fields in the SELECT statement.

Of the fields in the SELECT statement, the only one I care about being
DISTINCT is the key field. However, DISTINCT evaluates all fields in the
SELECT, collectively.
 
Top