Article View: borland.public.interbase.sql
Article #701Re: Extract
From: Quinn Wildman (CodeGear Develope...
Date: Wed, 25 Jul 2007 17:52
Date: Wed, 25 Jul 2007 17:52
17 lines
1490 bytes
1490 bytes
Another solution other than a view is to create a calculated field and group on it. For example, say you wanted to group on the year of the hire_date in the employee table of the employee sample database included with InterBase: alter table employee add hire_year computed by (extract(year from hire_date)); select hire_year,count(*) from employee group by hire_year; Thomas Steinmaurer wrote: > > 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. > >
Technical Details
Message-ID:
<46a78dfd$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<46a6e831$1@newsgroups.borland.com> <46a6ea91$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 10:52:59 -0700 From: "Quinn Wildman (CodeGear Developer Support)" <qwildman@nospam.codegear.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> <46a6ea91$1@newsgroups.borland.com> In-Reply-To: <46a6ea91$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 10.143.19.108 Message-ID: <46a78dfd$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1185385981 10.143.19.108 (25 Jul 2007 10:53:01 -0700) Lines: 17 Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail