You can use the Interactive SQL Export Wizard to export query results.
Use this export tool when you want to save result sets to a file or database. In Interactive SQL, from the Data menu, choose Export. This allows you to choose the file format of the exported query results.
The following example shows you how to export a result set from a SQL query to a file.
To export result sets data using Interactive SQL
Execute a query.
In Interactive SQL, choose Data » Export .
Follow the instructions in the wizard.
The following example shows you how to export a result set from a SQL query to a database.
To export result sets data to an UltraLite database using Interactive SQL
Execute the following query while connected to the SQL Anywhere sample database.
SELECT * FROM Employees WHERE State = 'GA'; |
The result set includes a list of all employees who live in Georgia.
Choose Data » Export.
The Export Wizard appears.
Select In A Database.
From the Database Type list, select UltraLite.
On the Identification tab, type dba and sql in the User Id and Password fields, respectively. In the Database File, type C:\Documents and Settings\All Users\Documents\SQL Anywhere 11\Samples\UltraLite\CustDB\custdb.udb.
Click Next.
Select In A New Table, type dba and NewTable, for the Owner and Table Name respectively, and then click Export.
The result set is exported to the table that you specified.
From the SQL menu, choose Previous SQL.
The IMPORT statement created and used by the Import Wizard appears in the SQL Statements pane:
-- Generated by the Export Wizard OUTPUT USING 'driver=UltraLite 11;UID=dba;PWD=sql; DBF=C:\Documents and Settings\All Users\Documents\SQL Anywhere 11\Samples\UltraLite\CustDB\custdb.udb' INTO "dba"."NewTable" CREATE TABLE ON |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |