Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Counting First Occurrences
Message
De
04/12/2006 17:34:29
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01174771
Message ID:
01174784
Vues:
9
Look up corellated sub-query. That's what you need to solve your problem.

>I need to count the total number of first occurances of this record.
>
>The records are date, with subsequent records having a greater
>StartDate value. I need to know the total number of first occurance
>records.
>
>
>SELECT SystemKey, UnitID1, StartDate
>	FROM acUnitSystems
>	WHERE StartDate > '2005-12-31'
>	ORDER BY SystemKey, UnitID1, StartDate
>
>
>Thanks

(On an infant's shirt): Already smarter than Bush
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform