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 |
|
kamii47
Constraint Violating Yak Guru
353 Posts |
Posted - 2011-12-28 : 09:03:53
|
| I have a following query which SELECT distinct ShipperApptID AS ShipperApptID, TrackingID AS TrackingID FROM tblCloseOutRequest is returning data as 111113082749 540000048459111114082610 540000048459111114092929 123000057890111119131982 540000048459What i needed is the result set should be like111113082749 540000048459111114092929 123000057890that is wanted to select top record with same TrackingIDKamran ShahidPrinciple Engineer Development(MCSD.Net,MCPD.net) |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-12-28 : 09:19:09
|
select min(ShipperApptID) as ShipperApptID, TrackingID from tblCloseOutRequest group by TrackingID No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|