Are they null?  Null is always not ever equal to anything.

Perhaps you want and (isnull(status,'') <> 'Removed') (MS SQL)

~Brad

-----Original Message-----
From: Daniel Kessler [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 09, 2007 9:29 AM
To: CF-Talk
Subject: SQL status <> 'Removed'

I have a query that is supposed to grab any record that has a status  
not equal to 'Removed'.  The status can be 'Approved', 'Interested',  
'Removed' or simply empty.  With the query below, it's not returning  
the ones that are designated empty, though it seems to me that it  
should.  Status is not a required field so it'll often be empty.

SELECT service_population,agency,city,state,int_agency_id, ROWNUM AS  
r, COUNT(agency) OVER() AS rowcount
FROM internships
WHERE 1=1 AND dept = 'knes' AND status <> 'Removed'
ORDER BY UPPER(agency) ASC


So why isn't it showing these records?

thanks.


-- 

Daniel Kessler

University of Maryland College Park
School of Public Health
Suite 2387 Valley Drive
College Park, MD  20742-2611
Phone: 301-405-2545
http://hhp.umd.edu






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285820
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to