Skip to Content
avatar image
Former Member

is this a bug in sybase iq?

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

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

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 02 at 07:15 PM

    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'

    Add comment
    10|10000 characters needed characters exceeded