We Value Your Privacy

We and our partners use technology such as cookies on our site to personalise content and ads, provide social media features, and analyse our traffic. Click below to consent to the use of this technology across the web. You can change your mind and change your consent choices at anytime by returning to this site.

Update Consent
Loading ...

How to Write a Query to Specify the Data to Transfer in the Import Wizard

Updated July 19, 2017

Importing data to your database is accomplished using the structured query language (SQL). Using an SQL query, you can filter the results retrieved from one database before importing it to another. Creating the query to import your records is similar to creating a query to retrieve and view records. The SQL query language makes it simple to import records and filter out unwanted table rows.

Loading ...
  1. Create a simple select statement. The select statement retrieves records for the import wizard. The following example retrieves records from a customer table:

  2. select * from customer

  3. Filter the records you want to retrieve. The "where" clause filters records from the list, so the import wizard only sets up the required records. The following code retrieves only the customers whose last name is "Smith":

  4. select * from customer where last_name='smith'

  5. Filter the columns imported. If your table is large, you may only want required table columns. The asterisk symbol retrieves all columns from the table. You can limit the columns for the import wizard by specifying each column to import. The following code only retrieves the first and last name from the table:

  6. select first_name, last_name from customer where last_name='Smith'

  7. Copy and paste the query to your import wizard. You can also test the query by pressing the F5 key to execute it and view the returned records.

Loading ...

About the Author

Jim Campbell has been a computer engineer for over five years. He excels in hardware repair, computer programming and troubleshooting, and software design. He is currently attending Florida Atlantic University, pursuing a master's degree in computer and electrical engineering and fine-tuning his technical writing abilities.

Loading ...