aneilg
asked on
SQL Import Wizard
I want to import tables from one row to another but i want to overwire the existing table with the new table, but it looks like the wizard only appends to the existing table.
Is there any way to drop the table first then inport the tables.
Is there any way to drop the table first then inport the tables.
ASKER
Its from the same server but a different database, the problem is there are over 60 tables, just thought there might be a way around it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Agree with reza_rad on this...You can select the option of 'Drop and Recreate destination table' if you want to have a fresh table.
Ritesh answer will have the problem if there is some relationship then drop will affect, but what reza has given will solve the problem for what ur looking for.
ASKER
Thanks for your help once again guys.
reza was spot on, i am not bothered about the relationships, so thanks for pointing that out.
thanks.
reza was spot on, i am not bothered about the relationships, so thanks for pointing that out.
thanks.
You can do something like this:
drop table db1.table1
GO
select * into db1.table1 from db2.table1
it will create table1 in db1 and import all records from table1 of db2 to db1.table1