rudy wrote:
 where year(date()) - year(DOBfield)
       - iif(month(date()) > month(DOBfield),0, 
         iif(month(date()) < month(DOBfield),1,
         iif(day(date()) < day(DOBfield),1,0))) 
   between 30 and 40

Tim:
Dang, rudy, you did it to me again - I didn't know SQL supported an
"iif"!  Just like VB.  :-)  Now I've got about 100 stored procedures to
go rewrite...

Tim <never stops learning>




____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
       Send Your Posts To: [EMAIL PROTECTED]
To set a personal password send an email to [EMAIL PROTECTED] with the words: "set 
WDVLTALK pw=yourpassword" in the body of the email.
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to