Reputation: 1
I am trying to query a Sybase using iSQL client and export the query results to a text file or CSV file with column name. However the column headings are not exported to the file. I tried below script it shows error message, below the working script without column heading and error script, appreciate any valuable advice.
working sql:
select * from siebel.S_ORG_EXT;
OUTPUT TO 'C:\\Siebel SQLs\\Account.CSV' FORMAT TEXT
DELIMITED BY ';' QUOTE ''
Not working sql :
select * from siebel.S_ORG_EXT;
OUTPUT TO 'C:\\Siebel SQLs\\Account.CSV' FORMAT TEXT
DELIMITED BY ';' QUOTE '' WITH COLUMN NAMES;
Upvotes: 0
Views: 9019
Reputation: 6981
Alternatively you could use a different SQL client. For example Squirrel SQL which supports JDBC connections. In other SQL clients you will need to import the jconn2.jar which is part of your local web client installation.
Upvotes: 0
Reputation: 1638
If you are using Sybase iAnywhere the WITH COLUMN NAMES
option is not recognized by that Sybase product. Just thought I'd mention this for those like myself who have struggled with a similar issue.
HTH
Upvotes: 1
Reputation: 1
You can try following query:
SELECT * FROM siebel.S_ORG_EXT; OUTPUT TO 'C:\\Siebel SQLs\\Account.CSV' FORMAT ASCII DELIMITED BY ';' QUOTE '' WITH COLUMN NAMES;
Upvotes: 0