db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebas.Panikulam" <Sebas.Paniku...@wellsfargo.com>
Subject Upcoming Birthdays Query for Derby database
Date Tue, 25 Nov 2008 21:38:13 GMT

Hi,
If anybody tried writing a query for Derby to fetch the upcoming Birthdays.
I am trying to modify the following query with respect to derby. The below
one will find the B'Days in the next 7 days.

SELECT * FROM [dbo].[tbl_EMPXYZ] 
WHERE MONTH(DOB) BETWEEN MONTH(GETDATE()) AND
MONTH(DATEADD(dd,20,GETDATE())) AND   
DAY(DOB) BETWEEN DAY(GETDATE()) AND DAY(DATEADD(dd,7,GETDATE()))

But I didn't find any function for adding date in derby(similar to DATEADD
in the above query). 

Does any one have a better approach or query?

Thanks
Sebas
-- 
View this message in context: http://www.nabble.com/Upcoming-Birthdays-Query-for-Derby-database-tp20690090p20690090.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message