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 |
|
compact
Starting Member
1 Post |
Posted - 2007-10-25 : 05:36:59
|
| HiI am bringing back a large amount of data, with many entries based around several different people.Is there any way of sayDisplay the first (or one) row for each new entry in the columni.e.NOTDave 1 UkDave 2 UsaDave 5 FranceGeorge 3 UKGeorge 6 GhanaPhil 2 JapanPhil 7 AmericaBUTDave 1 UKGeorge 3 UkPhil 2 JapanThis will help me check each person with having to scroll past the hundred or so entries for each person.cheers |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-10-25 : 06:34:27
|
With SQL Server 2005SELECT Col1, Col2, Col3 FROM (SELECT Col1, Col2, Col3, ROW_NUMBER() OVER (PARTITION BY Col1 ORDER BY Col2) AS RecID) AS d WHERE RecID = 1 E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|