Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 02, 2018 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.