Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Syntax help
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01398006
Message ID:
01398014
Views:
52
>Nevermind..I got it..
>
>
>select EDPNo, CaptureDate, ALertFlg
>from (select EDPNo, CaptureDate, ALertFlg,  row_Number() over (partition by edpno Order by CaptureDate DESC) as RowNumber 
>from ItemAlertFlgAudit ) D 
>where RowNumber = 1
>
You're welcome. Watch out for the same dates within the group, this query will return one random record.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform