September 18, 2006 at 7:48 am
I think this should be simple but I cannot find out how to do it. I need to append a table of one name with the identical structure, to another table in the same DB. Can I do this in DTS?
September 18, 2006 at 8:06 am
Quick and dirty :
Select * INTO dbo.Table2 from dbo.table1 where 1 = 0
That will copy the columns only, you won't have any dri, constraints, defaults, indexes or keys.
September 18, 2006 at 8:45 am
In DTS, if you're using the Import/Export Wizard, the default behavior is to append to an existing destination table. You can see this on the Column Mappings tab.
If you've created a package and are using a Transform Data task, the default is also to append to an existing table.
Greg
Greg
September 19, 2006 at 1:46 pm
what about
insert into table_to_add
select * from table_with_data
?
September 19, 2006 at 2:07 pm
Robert, that was EXACTLY what I needed! I could not get the syntax right. Gosh I thought it would be simple but this is ridiculous! Thank you so much!!! You made my day!
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy