Could be wrong here....Is your second table suppose to be myTb2 and not
myTb1? You may just be querying the same table I suppose.
SELECT t1.myCol
FROM myTbl t1
WHERE t1.myOtherCol = (
SELECT t2.myOtherCol
FROM myTb2 t2
WHERE t2.myCol = '#myVar#'
);
-----Original Message-----
From: Matt Quackenbush [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 18, 2007 6:18 PM
To: CF-Talk
Subject: MySQL Syntax (4.1)
Hello,
I am receiving a syntax error on this query, and I cannot for the life of me
figure out why.
SELECT t1.myCol
FROM myTbl t1
WHERE t1.myOtherCol = (
SELECT t2.myOtherCol
FROM myTbl t2
WHERE t2.myCol = '#myVar#'
);
According to the MySQL docs (referenced below) it appears that I have the
syntax correct, but I am obviously missing something here. Any help would
be much appreciated.
http://dev.mysql.com/doc/refman/4.1/en/comparisons-using-subqueries.html
Thanks in advance,
Matt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2.
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272960
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4