Export data using dbisqlc.exe utility

DBISQLC.EXE is the utility used to connect to sample/local database for DML,DDL operations. But how do we export the results of a query to a file?

 Solution:

 By using ‘OUTPUT’ command.

 e.g.

SELECT * FROM SIEBEL.S_CONTACT

To export the data to a file for the above query you have to issue the following query

SELECT * FROM SIEBEL.S_CONTACT ;
OUTPUT TO C:\RESULT.CSV
FORMAT ASCII

 Note:-Don’t forget to add ‘;’ after the query and before OUTPUT TO clause otherwise you will get an error. Also make sure that a blank file exists in the path before you execute the query.

 Syntax:-

OUTPUT TO file-name
[APPEND]
[VERBOSE]
[FORMAT output-format]
[ESCAPE CHARACTER  character]
[ESCAPES ON/OFF]
[DELIMITED BY string]
Tags