>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.