put AbsentStopDate IS NOT NULL in the where clause. I think that should do it.
> -----Original Message----- > From: Paul Broomfield [NEOCOM] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 13, 2002 5:26 PM > To: ActiveServerPages > Subject: SQL question > > > Hi, > > I have a table containing Employee data with two date fields in > AbsenceStartDate and AbsenceStopDate, I need to do a query that works out > amount of days absent per Employee - I've got that sorted using DATEDIFF > between the two dates. My problem is that if AbsenceStopDate > isNULL, which > will happen if this query is run whilst someone is absent, my SQL > statement > fails, so my question is, can I in an SQL statement replace a > NULL value in > AbsenceStopDate with a date, and still run my DATEDIFF, I'd prefer to do > this in one SQL statement rather than having to do it in ASP, > although if I > have to I'll pass the record set to my ASP page and do it from > there I will. > > Thanks > Paul > > Paul Broomfield > NEOCOM > CRM Building > 50 Dalton Street > Napier > New Zealand > > Tel: +64 (06) 83 555 34 > > > --- > You are currently subscribed to activeserverpages as: > [EMAIL PROTECTED] > To unsubscribe send a blank email to > %%email.unsub%% > > --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
