Question
Creating a new table on one DSN from a Select Statement on another DSN
I'm hoping to perform a select statement on a single table
located on DSN 1 and use it to create and populate a new table on
DSN 2. Is this possible? If not I could create the new table on DSN
1 to simplify the problem. I'm using ColdFusion MX7 and MySql.
Is there a way to use [queryname].columns when creating the new table or have the new table default to the columns in the select table being used to populate the table? I ask because I'm hoping to use this code with different select statements so I would always want the new table to contain the same columns as the select statement being used at the time. I also would like one additional boolean column in the second table but figure I can add that as a second step if needed.
I have looked a the INSERT statement combined with a SELECT statement so far but have not been successful. Any ideas are appreciated.
Is there a way to use [queryname].columns when creating the new table or have the new table default to the columns in the select table being used to populate the table? I ask because I'm hoping to use this code with different select statements so I would always want the new table to contain the same columns as the select statement being used at the time. I also would like one additional boolean column in the second table but figure I can add that as a second step if needed.
I have looked a the INSERT statement combined with a SELECT statement so far but have not been successful. Any ideas are appreciated.
