- Feb 18, 2011
- 2,716
- 4
- 81
Is there a way to find all the columns in a table and build a dynamics insert select string out it ?
If a table has col A, B, C
FIND A + B + C or more and build a dynamic sql string to INSERT into another table ?
Basically
INSERT INTO NEWTABLE (A, B, C)
SELECT A, B C FROM OLDTABLE
Can't generate enough cash flow, I need to write a script that builds that and run it as billable hours... I mean the 2 table will never change, the amount of columns will never change. so I cant just do a regular insert & select.
If a table has col A, B, C
FIND A + B + C or more and build a dynamic sql string to INSERT into another table ?
Basically
INSERT INTO NEWTABLE (A, B, C)
SELECT A, B C FROM OLDTABLE
Can't generate enough cash flow, I need to write a script that builds that and run it as billable hours... I mean the 2 table will never change, the amount of columns will never change. so I cant just do a regular insert & select.