Hello and a Happy 2008 to all.
I'm having a problem with retrieving data from a REAL SQL database when
trying to use SQL's NOT condition. I have a text field that may have a
particular value in it at times. When the record has that field
containing the particular value, I don't want it retrieved with the rest
of the records. So I tried the following scenario...
The field name is TORC and if it has the value 'RAGMANA' (don't ask) I do
not want it included in the record set. There are about 50 records in
the database so far and only a few have that value in that field. As far
as I can tell, the following SQL statement should work retrieve the rest
of the records...
SELECT * FROM THEDB WHERE NOT TORC = 'RAGMANA'
Nope, I get an empty recordset. So I tried
SELECT * FROM THEDB WHERE TORC <> 'RAGMANA'
Still nothing. So, just for fun, I tried
SELECT * FROM THEDB WHERE TORC = 'RAGMANA'
and, sure enough, I got ONLY those records with RAGMANA in TORC.
Does the REAL SQL database..er..not have a NOT? Or am I doing something
wrong? I know not. (Sorry, I couldn't resist it.)
Thanks for any help.
- Dale


|