Exporting Data from a SQL Query
1 Write a SELECT statement in the Query window, right-click the query, and then click Generate INSERT Scripts, depicted as follows:
The SELECT statement can be a simple query fetching data from one table, or it can have multiple JOINS combining several tables with complicated WHERE clause.
Notice that the only difference when exporting the result of a query verses exporting from a table is that in the latter case WinSQL Professional generates the SQL statement for you. This statement is a simple SELECT statement fetching all columns from the specified table. Therefore, the screens look very similar in both cases
Note: Synametrics strongly recommends running the query and checking for syntax errors prior to invoking this wizard.
As with any other WinSQL Professional wizard, you have a choice of creating a new template or use an existing template.
The following window displays:
2 If this is the first time you are running this wizard, select Create a new export template. An export template stores all necessary information required to move data from one source to another target and, if saved, can be used for future exports.
OR
Select Use an existing template that you previously created.
3 Click Next to continue. The following window displays:
4 Use the following information to complete the options displayed on this window.