Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Totals from a set of dates
Message
De
26/02/2010 06:52:03
 
 
À
26/02/2010 06:04:18
Moacyr Zalcman
Independent Consultant
São Paulo, Brésil
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Application:
Desktop
Divers
Thread ID:
01451177
Message ID:
01451194
Vues:
36
>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

What's wrong with this query?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform