Article View: borland.public.interbase.sql
Article #699Re: Extract
From: Thomas Steinmaurer
Date: Wed, 25 Jul 2007 06:16
Date: Wed, 25 Jul 2007 06:16
35 lines
1673 bytes
1673 bytes
> IB 6.02 > > Table : > CDate Total > --------------------- > 01/20/07 100 > 01/25/07 200 > 02/10/07 300 > 02/25/07 400 > 03/28/07 500 > > Requested Result : > Month SumTotal > -------------------------- > 01 300 > 02 700 > 03 500 > > I tested > select extract(month from cdate), sum(total) > group by cdate > but i couldnt get eachmonth's total In this scenario, with IB 6.02, you need to create a view which has the month information in its result and then group by this field. -- Best Regards, Thomas Steinmaurer LogManager Series - Logging/Auditing Suites supporting InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2 Upscene Productions http://www.upscene.com
Technical Details
Message-ID:
<46a6ea91$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<46a6e831$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,6fd982b7bb1d6c61 X-Google-Attributes: gid114a0e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 25 Jul 2007 08:16:37 +0200 From: Thomas Steinmaurer <t.steinmaurer_dontbugmewithspam@upscene.com> User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 Newsgroups: borland.public.interbase.sql Subject: Re: Extract References: <46a6e831$1@newsgroups.borland.com> In-Reply-To: <46a6e831$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 193.186.164.88 Message-ID: <46a6ea91$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1185344145 193.186.164.88 (24 Jul 2007 23:15:45 -0700) Lines: 35 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail