"Bruce D" <br*************@hotmail.com> wrote in message
news:10*************@corp.supernews.com...
"Bruce D" <br*************@hotmail.com> wrote in message
news:10*************@corp.supernews.com... I have this simple subquery...and I get an error when I try to run it??
SELECT ZipID
FROM testzip
WHERE ZipID
<> (
SELECT ZipID
FROM Zip )
any ideas?
TIA
-bruce duncan
Oh...I guess it's because I'm running 4.0.12!
Any ideas on how to get around this?
Temporary tables!
Dangerous for me to try this since I don't really know what you are working
with, but I'm sure you can adapt it to your own situation.
# ------------------------------------------------
CREATE TEMPORARY TABLE tmp_Zip
SELECT ZipID FROM Zip;
SELECT testzip.ZipID
FROM testzip, tmp_Whatever
WHERE (testzip.ZipID<>tmp_Zip.ZipID);
DROP TABLE tmp_Zip;
# ------------------------------------------------
The beauty of temporary tables is that they are local and private to your
connection. 50 different logons can all use the same temporary table name
without stepping on one another. Temporary tables also disappear (are
dropped!) as soon as you close your session. This makes the DROP TABLE when
you are finished unnecessary - although I do it anyway because it is good
practice to clean up after yourself.
Thomas Bartkus