I need to create a dynamic sp in order to create temporal tables using the EXEcuted statement creating a string cmd:
exec @cmd = ('select * into from' + @tabname)
But I need to exclude some columns to not include into the new temp table. I already have a TableList in wich I specify the Exclude column names. For example, I have a table with 100 columns, however I need only 90 columns, my idea is to exclude columns instead of specify the 90.
Any idea or another way to do it?...
exec @cmd = ('select * into from' + @tabname)
But I need to exclude some columns to not include into the new temp table. I already have a TableList in wich I specify the Exclude column names. For example, I have a table with 100 columns, however I need only 90 columns, my idea is to exclude columns instead of specify the 90.
Any idea or another way to do it?...