Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change destination table name in SQL Server Import and Export Wizard

I use SQL Server Import and Export Wizard to transfer data from a remote server to my local server.

  • First step, Choose a Data Source.
  • Second step, Choose a Destination.
  • Third step, Specify Table Copy or Query, there are 2 options
    • I choose Write a query to specify the data to transfer because I need to organize the data on remote server first and then transfer the result.
  • Then I specify the SQL statement I want to run on remote server.

I found that the destination table name on my local server is forced to be 'Query'. How can I change this from Query to something I specify?

like image 756
Ziyang Zhang Avatar asked Dec 03 '25 07:12

Ziyang Zhang


1 Answers

On the screen after you select the query you get the 'Select Source Tables and Views' screen. On this screen you can select which table the data is written to in the destination column. This drop down will let you select any table in the destination database. So you will need to create your destination table in the destination database before using the wizard.

You can also edit column mappings and what happens to existing data by using the 'Edit Mappings...' button.

like image 171
Alan Hinton Avatar answered Dec 06 '25 01:12

Alan Hinton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!