one to many query

B

Brian

Hi. I have a query that grabs data from table one and using a left join to
marry data on the right table. Problem is that on the left table I have
unique values. On the right table those unique values repeat for each row in
which their is related data. ( IE: think mulit-line report with demographic
info on each line.) Rather than pulling all rows, i'd like to pull only the
first match. Other than adding an additional key ( which I can't) how can I
do this?


thanks in advance,
 
G

Guest

hi,
not sure if it will work but....
open your query in SQL view.(view>SQL)
change SELECT Field1.... to SELECT DISTINCT field1...
worth a try.
 
J

John Vinson

Hi. I have a query that grabs data from table one and using a left join to
marry data on the right table. Problem is that on the left table I have
unique values. On the right table those unique values repeat for each row in
which their is related data. ( IE: think mulit-line report with demographic
info on each line.) Rather than pulling all rows, i'd like to pull only the
first match. Other than adding an additional key ( which I can't) how can I
do this?

What do you mean by "the first match"? Tables have no order; they're
"heaps" of data. "First" has meaning only in the context of a sorted
Query, sorted by some field within the table.

John W. Vinson[MVP]
 
Top