Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group By
Message
 
 
To
20/04/2009 18:38:39
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01395684
Message ID:
01413224
Views:
77
Please see link from this message #1413220 discussing this very problem in details.

>I'm having a group by brain-fart. Somebody please point me in the right direction...
>
>I have the following data:
>
>ID|FK|Status|StartDate
>1|1|Started|1/1/2008
>2|1|Finished|1/2/2008
>3|2|Started|3/2/2008
>4|3|Started|5/1/2008
>5|3|Finished|5/4/2008
>
>
>This is a transactional flow of items through statuses. I would like to see what status each item is currently set to, which should be the greatest StartDate. In my example, I want to see:
>
>FK|Status
>1|Finished
>2|Started
>3|Finished
>
>
>Thanks in advance!
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform