Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 simple Query

Author  Topic 

andrewcw
Posting Yak Master

133 Posts

Posted - 2005-07-08 : 11:17:59
If I have columns that look like:

1100 01
1100 01
1100 02

and I want just the unique entries of the 2 columns so I have

1100 01
1100 02

How should the SQL appear... Thanks

andrewcw

Thrasymachus
Constraint Violating Yak Guru

483 Posts

Posted - 2005-07-08 : 11:47:55
SELECT DISTINCT field1, field2
FROM yourTable

Sean Roussy

Please backup all of your databases including master, msdb and model on a regular basis. I am tired of telling people they are screwed. The job you save may be your own.

I am available for consulting work. Just email me through the forum.
Go to Top of Page

andrewcw
Posting Yak Master

133 Posts

Posted - 2005-07-08 : 12:12:45
thanks !!!

andrewcw
Go to Top of Page
   

- Advertisement -