MSSQL Server Import wizard

Bill Rago 1 Reputation point

I am using MSSQLserver import wizard. After clicking the EDIT MAPPINGS option I want to edit the SQL and I select this option. In editing the create table query I would like to add a "where" condition to limit the number of hospitals I want to import data from. I have tried several ways and can't get it to work. Any ideas?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,925 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Vaibhav Chaudhari 38,661 Reputation points

    When you provide source & target details, on the next page you should see below options and you choose "Write a query.." and provide select query with where clause so that the result data will flow to your target table



    Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav

    1 person found this answer helpful.
    0 comments No comments

  2. CathyJi-MSFT 21,096 Reputation points Microsoft Vendor

    Hi @Bill Rago ,

    From your description, please choose Write a query to specify the data to transfer option during the process.

    Write a query to specify the data to transfer
    Select this option if you want to filter or sort the source data before you copy it to the destination.
    When you select Write a query to specify the data to transfer, you can only copy the results of one query to one destination table.

    Copy data from one or more tables or views
    Select this option if you want to copy data from the source without filtering or sorting records.

    Below is a test in my environment.

    Refer to MS document Specify Table Copy or Query (SQL Server Import and Export Wizard).

    If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar thread.

    0 comments No comments