Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 3 of 3 total |
DAY + MONTH functions |
Mon, Feb 6 2006 10:41 AM | Permanent Link |
"Jack Marsh" | Hi,
I am trying to write a query that will select all contacts whose birthday falls between a specified period. So I am trying to ignore the year and search using day and month only; however, I don't seem to be able to get DBISAM to accept my query. For example to find every contact whose birthday is in April I thought that I could do the following: SELECT ContactCode FROM Contacts WHERE MONTH(Birthday) = 4; However, this won't parse. How do I implement the DAY and MONTH functions? Thanks, Jack |
Mon, Feb 6 2006 11:36 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jack,
<< However, this won't parse. How do I implement the DAY and MONTH functions? >> You're close. What you want to use is the EXTRACT() function: SELECT ContactCode FROM Contacts WHERE EXTRACT(MONTH FROM Birthday) = 4; -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Feb 6 2006 11:42 AM | Permanent Link |
"Jack Marsh" | Thanks Tim
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:707EBBD2-9FA2-4DB1-A38D-D0858252E42E@news.elevatesoft.com... > Jack, > > << However, this won't parse. How do I implement the DAY and MONTH > functions? >> > > You're close. What you want to use is the EXTRACT() function: > > SELECT ContactCode FROM Contacts WHERE EXTRACT(MONTH FROM Birthday) = 4; > > -- > Tim Young > Elevate Software > www.elevatesoft.com > > > > > |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |