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 |
|
paganini
Starting Member
2 Posts |
Posted - 2007-01-22 : 14:55:39
|
| How do I display only those rows with single occurance value in the LID column? Original table:SID | LID94 | 2222 | 2130 | 382 | 499 | 5161 | 5103 | 6161 | 799 | 7103 | 8Desired output:SID | LID130 | 382 | 4103 | 6103 | 8Thanks in advance! |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2007-01-22 : 15:32:48
|
| [code]select SID = Max(SID), LIDfrom MyTablegroup by LIDhaving count(*) = 1order by LID[/code]CODO ERGO SUM |
 |
|
|
paganini
Starting Member
2 Posts |
Posted - 2007-01-22 : 17:07:49
|
| Perfecto! Thanks very much Michael. |
 |
|
|
|
|
|