Hi...
I'm trying to write a sql statement
that would include people whose status
is active, or status is null or status
= '' or status is terminated but terminated
within the last 30 days. Here is my sql code:
select ....
from .....
where termdate IS NULL OR termdate = ''
OR termdate <= DATEADD(d, 30, GETDATE())
it gave me no error, but what i got in return
it included people terminated more than a
year ago too. how come?
please help, any input would be greatly appreciated.
thanks so much.
I'm trying to write a sql statement
that would include people whose status
is active, or status is null or status
= '' or status is terminated but terminated
within the last 30 days. Here is my sql code:
select ....
from .....
where termdate IS NULL OR termdate = ''
OR termdate <= DATEADD(d, 30, GETDATE())
it gave me no error, but what i got in return
it included people terminated more than a
year ago too. how come?
please help, any input would be greatly appreciated.
thanks so much.