Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to copy data from a table to another
Message
 
 
To
15/12/2000 16:20:27
General information
Forum:
Microsoft SQL Server
Category:
Import/Export
Miscellaneous
Thread ID:
00454244
Message ID:
00454267
Views:
23
>I have two identical tables. I want to transfer data from one to another.
>I want to know if a it exists a stored procedure or a command in SQL to do that, or if a have to prepare my own stored procedure. I already checked
>the Import/Export Data possibility but it seems from a database to another
>database. My both tables are in the same database... Thank you for your help.

If the user where the source table allows selects from the other user table, there is a SQL. Keep in mind I am using Oracle, so translate the the SQL Server equivalent:

insert into mytable (select * from otheruser.mytable);

This assumes identical table structure and no Long [raw] data type fields. You can also include a where clause in the sub-query.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform