cancel
Showing results for 
Search instead for 
Did you mean: 

is this a bug in sybase iq?

Former Member
0 Kudos
280

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

Former Member
0 Kudos

@@version
'Sybase IQ/15.4.0.3014/120310/P/ESD 1/Sun_x64/OS 5.10/64bit/2012-03-10 11:23:59'

View Entire Topic
Gisung
Product and Topic Expert
Product and Topic Expert
0 Kudos

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