Subject Re: [firebird-support] Average age
Author Hans Hoogstraat
select cast('today' as date)

seems to work for dialect one


----- Original Message -----
From: "Andrea Raimondi" <rainaple@...>
To: <firebird-support@yahoogroups.com>
Sent: Sunday, July 11, 2004 9:54 AM
Subject: [firebird-support] Average age


| Hello,
|
| I have a field called DOB( DateOfBirth ) in one of my tables.
| I need to gather average age for males/females artenatively.
|
| My SQL is like this now:
|
| Select avg( ( extract( year from ???? ) - extract(year from DOB) ) /
| count( * ) )from TblPerson where( Sex = 'Female' )
|
| I don't remember how the function to retrieve actual date is called.
| Plus, if you see any other wrong thing with this query, please do
| point me to what's wrong and how to fix it.
|
| TIA,
|
| Andrew
|
|
|
|
| Yahoo! Groups Links
|
|
|
|
|