Mensaje
De
26/02/2010 06:04:18
Moacyr Zalcman
Independent Consultant
São Paulo, Brazil
 
 
a
Todos
General information
Foro:
Microsoft SQL Server
Category:
Sintáxis SQL
Título:
Totals from a set of dates
Environment versions
SQL Server:
SQL Server 2005
Application:
Desktop
Miscellaneous
ID de la conversación:
01451177
ID del mensaje:
01451177
Views:
86
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
Next
Responder
Mapa
Ver