problem with NULL
Posted: Fri May 24, 2002 12:30 pm
I have a table with the following values:
CUST_ID STATUS
1000000 NULL
1000001 ACTIVE
1000002 DEACT
where I do
select count(*),isnull(STATUS,'ACTIVE') as STATUS
from CUSTOMER_TABLE
grop BY STATUS
why do I get
1 ACTIVE
1 ACTIVE
1 DEACT
instead of
2 ACTIVE
1 DEACT
Any help appreaciated, BTW,I 'm using SQL server 7.0
CUST_ID STATUS
1000000 NULL
1000001 ACTIVE
1000002 DEACT
where I do
select count(*),isnull(STATUS,'ACTIVE') as STATUS
from CUSTOMER_TABLE
grop BY STATUS
why do I get
1 ACTIVE
1 ACTIVE
1 DEACT
instead of
2 ACTIVE
1 DEACT
Any help appreaciated, BTW,I 'm using SQL server 7.0