{ OJ } fails when joining more than 2 tables
am 19.05.2003 12:03:29 von BrianI've been playing around with it for a while now, and it appears as though
MySQL doesn't properly support { OJ }. It works when you join just 2
tables, for example:
SELECT * FROM { OJ t1 INNER JOIN t2 ON t1.a = t2.a }
However, if you try to join 3 tables, like so:
SELECT * FROM { OJ (t1 INNER JOIN t2 ON t1.a = t2.a) INNER JOIN t3 ON t1.b
= t3.b}
Then you get a Syntax error. This is using MySQL 4.0.12 and MyODBC 3.51.06
Taking out the { OJ } will make the select statement work just fine, which
tells me it's not something to do with the syntax of the command, but
rather with the way MySQL is parsing the { OJ }. If I read correctly, it
could/should just drop the { OJ }, as it is simply used as a
deliminator. Unfortunately I cannot easily drop it from the query on my
side as I am using generated SQL statements.
FYI, that SQL statement works on MS SQL server, and is supposed to be ANSI
92 SQL (I cant' say for sure because I cannot find the actual ANSI 92 SQL
specs anywhere).
--
Brian Harris
http://www.binaryc.com
1011100101100100101111b
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org