Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql Syntax to make this group by ?
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00755254
Message ID:
00755700
Views:
8
You're welcome.

>Thank's a lot
>
>>Rock,
>>
>>Assuming that bigger UniqueId means later note
SELECT * FROM mytable mt1
>>  WHERE NOT EXISTS (
>>     SELECT * FROM mytable mt2
>>          WHERE mt2.ClientId = mt1.ClientId
>>              And ( mt2.date > mt1.date OR mt2.UniqueId > mt2.UniqueId) )
If UniqueId cannot be used for that than you've to define how to determine in terms of data which note with the same date is the latest.
>>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform