Last post Aug 20, 2011 06:18 AM by umairaslam22
May 26, 2011 03:05 AM|umairaslam22|LINK
there is a pretty nice method available to Transfer data from one table to another
Transfer data from existing table to new Table :
select * into table2 from table1
Copy all data from table1 into table2 ( it creates new table2 no need to write Create statement )
It will create new table2 and transfer all data from table1 to table2
Transfer data from existing table1 to existing table2 :
If u want to transfer data from one table to existing table2 then use
Insert into vt_FE_Role1Select [Role] from vt_FE_Role
donot include primarykey column if it is set as identity . otherwise you can use it.
You must take care of RDBMS if exists
Aug 18, 2011 11:50 AM|mike2315|LINK
What to do if you want to copy with primary key (using indentity) ?
Aug 20, 2011 06:18 AM|umairaslam22|LINK
Just do one simple thing. Switch off Primary key constraint on both tables use above query then switch On identity.
Most of data trasformation tools (SQL Belt etc) use this first disable all constraints then apply same constraints