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.
| Author |
Topic |
|
Yasir
Starting Member
1 Post |
Posted - 2004-05-12 : 10:01:43
|
| Hi,Hope someone could help me.I have thousands of records which consists of 20 columns in a table, inside this table there are many records that have the same ID. I would like to return the results of the first raw based on the uniqueness of the ID. i.e.table jobsPSD_ID FNAME SNAME COUNTRY etc.....SHDS111 Mike Jones UK SHDS222 Samantha Evans AmericaSHDS888 Lee Wong ChinaSHDS111 Julie Stevens UKSHDS999 Ali Mohamad Saudai ArabiaSHDS222 Richard Mccarthy AmericaSHDS111 Edward Jones UKThe results I would like to get back are:table jobsPSD_ID FNAME SNAME COUNTRY etc.....SHDS111 Mike Jones UK SHDS222 Samantha Evans AmericaSHDS888 Lee Wong ChinaSHDS999 Ali Mohamad Saudai Arabia Hope you can helpRegards. |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2004-05-12 : 10:17:44
|
| How are you defining FIRST ? what is the key to this table (is there one?) why are you retuning Mike Jones instead of Edward Jones, based on the sample data you have provided. remember, SQL Server has no notion of a row order-- everything is done based on the VALUES in the DATA --not how it was physically inserted or how it is physically stored.- Jeff |
 |
|
|
|
|
|