Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple distinctrow issue

Status
Not open for further replies.

mhoek74

Programmer
May 6, 2003
5
US
OK, this seems simple enough...I would like to get distinct rows from the following query:

SELECT DISTINCTROW Query1.[Managers First Name], Query1.[Managers Last Name]
FROM Query1 INNER JOIN Table1 ON (Query1.[Managers Last Name] = Table1.[Last Name]) AND (Query1.[Managers First Name] = Table1.[First Name]);

Instead, I am getting all rows returned.

Any ideas? Thanks!
Mike
 
What does you mean by distinct rows?

Give some sample data and the expected result.
 
Here are some results from this query...

Kirk Stevenson
Kirk Stevenson
Alton Jones
Daniel Harlewicz
Kevin Kones
Kevin Kones
Kevin Kones
Kevin Kones
Kevin Kones

I would expect to only see...

Kirk Stevenson
Alton Jones
Daniel Harlewicz
Kevin Kones

Thanks,
Mike
 
That was it! (Why couldn't I think of that?)

Maybe someone could explain this to me...because I thought distinct would only give me a single distinct column (like in my example all distinct first names) while you needed the distinct row for the operator to look at all columns.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top