Try to guess what this WHERE clause is supposed to do.

 

WHERE

r

.ApptId IS NULL

AND r.DATE >= ISNULL(NULL , '1/1/1900')

AND r.DATE < DATEADD(d , 1 , ISNULL(NULL , '1/1/3000'))

AND

--Filter on resource

( ( NULL IS NOT NULL

AND r.DoctorResourceID IN ( NULL ) )

OR ( NULL IS NULL ) )

AND --Filter on facility

( ( NULL IS NOT NULL

AND r.FacilityID IN ( NULL ) )

OR ( NULL IS NULL ) )

AND --Filter on Inactive

ISNULL(r.inactive , 0) = 0

ORDER

BY

ISNULL(g.LAST , '') + ISNULL(g.FIRST , '')

 

If you think I made that up, then you are in for a surprise. This is actually part of a query, I found it here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3662895&SiteID=1

This NULL IS NULL and NULL IS NOT NULL stuff is just killing me. I wonder why this person did not get an answer yet.....Enjoy your weekend  :-)


Posted by Denis Gobo, filed under Uncategorized. Date: July 25, 2008, 1:24 pm | No Comments »


Search Engine Optimization and SEO Tools