Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group by with an order field
Message
 
To
15/09/2010 13:05:32
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01481294
Message ID:
01481313
Views:
22
>>If I understood your question correctly you can do ORDER BY MAX(Event.DateTime) from the first select (and adding the top 10 to it)
>
>Based on this, the following would work:
>
>
>SELECT TOP 10 Event.RO_No,Min(Event.DateTime) AS LastUpdate
> FROM Event
> GROUP BY Event.RO_No
> ORDER BY MIN(Event.Datetime)
>
>
>Thanks

You are welcome
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Reply
Map
View

Click here to load this message in the networking platform