You are here: Re: sum of sums « MsSQL Server « IT news, forums, messages
Re: sum of sums

Posted by Gert-Jan Strik on 10/19/05 13:08

Duane,

The statement “select sum(EXT_AMT) where month = '10'” would give just
one total. Maybe there is still a GROUP BY clause in the same query that
you need to remove.

Gert-Jan


Duane123 wrote:
>
> Hello, any help is appreciated.
> Here is what I’m trying. I want a month to date total of bookings
> based on a fiscal month.
> I can isolate my records for the month and sum up the days so I wind
> up with a list of days of the month with their bookings total for
> that day. Like this
> 10/1/05 - $1000
> 10/2/05 - $5000
> 10/3/05 - $2000
> And so on thru the month.
> But I want the sum of month 10.
> I have a line of code like “select sum(EXT_AMT) where month = “10””
> What I need is sum(sum(EXT_AMT).
> And that does not work.
> Any suggestions? I thought to throw the results into a table then sum
> the table.
> Not sure how to do that either! I'm frustrated! Any help is
> appreciated.
> Thanks, Duane

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация