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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to filter duplicate rows

Status
Not open for further replies.

HeinzW

Programmer
Nov 16, 2002
2
CA
I'm trying to use Access to populate a form (asp)

What I'm trying to accomplish is searching for a car and use Access/Asp to build my selection forms dynamically.

As an example: the table has entries for 20 makes and some 50 models. This means that the year column and the make column all have their values repeated many times. What I'm trying to do is extract a single occurance only of each year for example.

I'm pretty new to SQL and digging in a book I ran accross the UNIQUE operator which looked like it would do what I want, but I can't get it working in Access so I'm looking at MS SQL as an alternative but I don't know it it would do it either.

The sample in the book was:
WHERE UNIQUE (SELECT SALARY FROM EMP_TBL WHERE EMP_ID = '123')

The caption was: The UNIQUE operator searches every row of a specified table for uniqueness (no duplicates).

Can someone tell if this does indeed work in MS SQL or better yet that it works in ACCESS.

Thanks in advance.

Heinz
heinz@bytedesigns.com
 
I have never seen the UNIQUE in a where clause in either Access 2000 or SQL Server.

Show an example of your table(s) and what the results should look like I am sure there is a way to do what you want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top