Link to home
Start Free TrialLog in
Avatar of sulzener
sulzenerFlag for United States of America

asked on

Simple SQL Select question

I have a table that has a RecStatus field in it.  For certain record types, the RecStatus is empty.
When I run the sample queries below, only the records with a RecStatus <> Imported or Pursuing are returned. (ie. RecStatus=Maintaining or New are returned)  The records where RecStatus is empty are also not returned.  Can someone tell me why?  Can someone tell me how to fix?  I need the empty RecStatus records as well.

Sample 1:
<cfquery name="sqlAccounts" datasource="#Request.SomeDSN#">
SELECT * FROM tblAccts WHERE RecStatus <> 'Imported' AND RecStatus <> 'Pursuing'
</cfquery>
Sample 2:
<cfquery name="sqlAccounts" datasource="#Request.SomeDSN#">
SELECT * FROM tblAccts WHERE RecStatus NOT IN('Imported','Pursuing')
</cfquery>
ASKER CERTIFIED SOLUTION
Avatar of JipFromParis
JipFromParis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sulzener

ASKER

Thanks ... Not sure that has ever registered with me before.  Thanks for clearing that up.