[thelist] SQL: Birthday report

Joshua Olson joshua at waetech.com
Sat Oct 19 14:29:00 CDT 2002


----- Original Message -----
From: "Seth Bienek" <evolt.list at sethbienek.com>
Sent: Friday, October 18, 2002 10:05 AM


> The major problem with this approach being that I am using SQL Server
> and the constructs he provides don't work with SQL server, specifically
> this statement:
>
> - ( RIGHT(DATE_ADD(CURRENT_DATE, INTERVAL 14 DAYS),5)
>            < RIGHT(birthdate,5)

The SQL construct most closely related to the one Rudy provided is
DateAdd... the following should work with SQL Server.

WHERE DateAdd(d, 14, GetDate()) >= birthdate

The reference:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_
tsqlcon_6lyk.asp

-joshua




More information about the thelist mailing list