Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic Realbasic > NOT in Database
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3293 of 3314
Post > Topic >>

NOT in Database

by Dale Arends <dalearendssafe@[EMAIL PROTECTED] > Dec 30, 2007 at 05:04 PM

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




 1 Posts in Topic:
NOT in Database
Dale Arends <dalearend  2007-12-30 17:04:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 7:06:26 CDT 2008.