I'm using Perl DBI to manage a set of MySQL tables. I want to copy a set of
records from a table and re-insert them with a new radio station id.
Selecting the set of records is no problem, but there is no equivalent of
the SELECT * for the insert command (INSERT INTO *). What I have done is
used show columns to get a list of field names and from this built a string
for the insert command. I don't want to change any timestamp values, which I
don't because I reference those fields in the insert string. I have had to
look at field types and escape special chars in text fields. Now I have hit
another wrinkle. We use a seperate id field as a primary key so I don't want
to insert this value, I want the data base automatically pick a value for
this field. Again, I can do this.
Is there an easier way?
Internet Product Engineering Manager
1500 Green Hills Road
Scotts Valley, CA 95066
1-831-440-0300 ext 185