Skip to Content
0

is this a bug in sybase iq?

Dec 18, 2017 at 04:13 PM

79

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
Former Member

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

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

avatar image
Former Member
Dec 22, 2017 at 01:17 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jan 02 at 07:15 PM
0

I am using EDBC connection and it does not work, could that be the reason? I wonder!

My iq version is:

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

Share
10 |10000 characters needed characters left characters exceeded