Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Counting First Occurrences
Message
From
04/12/2006 17:34:29
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01174771
Message ID:
01174784
Views:
8
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
Previous
Reply
Map
View

Click here to load this message in the networking platform