Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Group By
Message
 
 
À
20/04/2009 18:38:39
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01395684
Message ID:
01413224
Vues:
75
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform