Well, this is what I get for not testing things first ... it seems that mysql really doesn't like that syntax, using Mysql 4.0.20 :
I'm shocked, myself, that it doesn't let you put a constant first, but it does last. You can either give the entire list of fields for the insert, or we can cheat a few other ways.
If you can create a temporary table (but you'll only get nulls in the new fields ... I don't know of an equivalent to oracle's nvl() in mysql)
As we're quickly out of the realm of Perl, even DBI, you might want to try on a more mysql-specific forum, as they'd be more likely to know what the inner tricks are for doing this sort of thing, and there may be some other easy way to get what you want done. And just to check that I wasn't crazy, the following works in Oracle:
SQL> select 'test',coordsys.* from soho.coordsys;
'TES ID_COORDSYS COORDSYS_NAME
---- ----------- --------------------------------------------------
test 1 Solar Disc
test 2 Heliographic
test 3 Heliocentric Ecliptic
test 4 Geocentric Inertial
test 5 Geocentric Solar Magnetosferic
test 6 Galactic
test 7 SOHOcentric Ecliptic
test 10 SDC
test 11 Solar Disc Polar
test 12 N/A
test 13 Solar Cropped
11 rows selected.
|