Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Totals from a set of dates
Message
 
 
To
26/02/2010 06:04:18
Moacyr Zalcman
Independent Consultant
São Paulo, Brazil
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Application:
Desktop
Miscellaneous
Thread ID:
01451177
Message ID:
01451205
Views:
31
>Hi, people
>
>I need to get sum of sales from a set of dates. Something like
>
>select sum(totalsales) from tbltable where caddate>=@somedate, but from a lot of dates.
>
>I could do that with a cursor but It takes a lot of time. Is there a way to do that in a set-based way
>
>
>TIA

Do you mean you want to pass many date ranges? What is the problem exactly?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform