on 2017 Dec 18 4:13 PM
I try to extract data from tables views, queries to file from Sybase iq with columns headers, here is what happens:
select* from sysobjects;
OUTPUT TO 111 FORMAT ASCII QUOTE ''DELIMITED BY '|' WITH COLUMN NAMES;
Syntax error: 'WITH' was not expected here.
File: "extract_iq_to_file.sh_qu_3860" on line 2, column 51
OUTPUT TO 111 FORMAT ASCII QUOTE ''DELIMITED BY '|' WITH
Syntax error: 'WITH' was not expected here.
please shed some light
Hi,
Here are my steps to test.
1. vi test.sql
[hpita:/bjeon] cat test.sql
select* from sysobjects; OUTPUT TO 111 FORMAT ASCII QUOTE ''DELIMITED BY '|' WITH COLUMN NAMES;
2. Run sql using dbisql
[hpita:/bjeon] dbisql -c dsn=dba -nogui -q test.sql
3. [hpita:/bjeon] cat 111 name|id|uid|type|userstat|sysstat|indexdel|schemacnt|sysstat2|crdate|expdate|deltrig|instrig|updtrig|seltrig|ckfirst|cache|audflags|objspare ISYSTAB|1|0|S|0|0|0|0|0|||0|0|0|0|0|0|0|0 ISYSTABCOL|23|0|S|0|0|0|0|0|||0|0|0|0|0|0|0|0 ISYSOBJECT|43|0|S|0|0|0|0|0|||0|0|0|0|0|0|0|0
And I can get the result via interactive sql java(pc client).
What's your IQ versioin?
Best Regards,
Gi-Sung Jang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.