I'd use COALESCE() instead. Does everything that ISNULL() does, and it
accepts multiple arguments and is ANSI SQL compliant.

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Paul Broomfield [NEOCOM]" <[EMAIL PROTECTED]>
Subject: RE: SQL question - FIXED


: I've found an answer - as usual I was looking for a way to complex way of
: doing it.
:
: I used the SQL ISNULL(value1,replacementVal) function
:
: Ta ta
: Paul
:
: Paul Broomfield
: NEOCOM
: CRM Building
: 50 Dalton Street
: Napier
: New Zealand
:
: Tel: +64 (06) 83 555 34
:
:
:
: -----Original Message-----
: From: Paul Broomfield [NEOCOM] [mailto:[EMAIL PROTECTED]]
: Sent: Wednesday, 14 August 2002 10:26 a.m.
: 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.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Reply via email to