"Sebas.Panikulam" <[EMAIL PROTECTED]> writes:

> 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). 

This link shows some ideas:

http://www.mailinglistarchive.com/[email protected]/msg02879.html

You could also use stored functions:

http://db.apache.org/derby/docs/10.4/ref/rrefcreatefunctionstatement.html

Thanks,
Dag

Reply via email to