Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
If I rewrite the query, it works:create temporary table foo as select id as id, person as person from mytable in (select id from person)
Although I have found a workaround, I am curious why this would cause problems. The error seems to be in the subquery: "You have an error in your SQL syntax...near 'select id from person)'".create temporary table foo as select mytable.id as id, mytable.person as person from mytable, person where mytable.person=person.id
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI (DBD::Mysql) subquery issue
by gam3 (Curate) on Jul 29, 2005 at 12:44 UTC | |
|
Re: DBI (DBD::Mysql) subquery issue
by davorg (Chancellor) on Jul 29, 2005 at 12:52 UTC |