Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where expression confusion. 1

Status
Not open for further replies.

DataHugger

Programmer
May 26, 2004
38
US
I have a query that I thought I wrote right, but since it isn't working correctly I must be wrong in my syntax, but I don't even know where to look to correct my SQL grammar.

So if any one could drop a quick line to answer this very green question it would be helpful or even if you think that I should look it up where do I look?

For me the query below will return the ID and RANGE where there is a RANGE and the RANGe is not equal to the string "Not Available"

Where am I wrong?


select ID, RANGE
FROM table1
Where Range IS NOT NULL AND NOT Range = "Not Available";
 
select ID, RANGE
FROM table1
Where Range IS NOT NULL AND Range != "Not Available";


that should be correct
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top