SQL 2008R2: Looking for a fast way to do a 'INSERT INTO target <all columns except two> SELECT <all columns> FROM source'
Posted on 2014-12-04
I'm doing a SQL-to-SQL conversion, and have 50+ tables to convert from old (source) to new (target) database. I think the answer is 'there's no really fast way to do this', but I'll ask the question anyways.
Each 'group' has..
Two Source tables: Anywhere from 10 to 700 columns.
These two tables have the same schema, although some columns have different collations.
Target tables: Number of columns = Columns in source tables + 2, as I added start_dt and end_dt.
I can't do a 'INSERT INTO Target SELECT * FROM Source' because of the two extra columns.
Question: What's the fastest way to do a 'INSERT INTO target <all columns except two> SELECT <all columns> FROM source'?
Using a view in the designer I don't see a way to select all and have it show all columns, and then just remove the two I don't need. * displays as * instead of all column names.
I'll entertain third party apps on this one.