Skip to Content
avatar image
Former Member

How can one get teh columns headers (names) in sybase IQ extraction

The following when run with dbisql produces the desired results:

select* from sysobjects;

OUTPUT TO 111 FORMAT ASCII QUOTE ''DELIMITED BY '|'

But if I want to have the column name on the top of the results, what should be done?
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Dec 20, 2017 at 07:22 AM

    Hi,

    Try to test with the following query.

    select* from sysobjects;

    OUTPUT TO 111 FORMAT ASCII QUOTE ''DELIMITED BY '|' WITH COLUMN NAMES;

    Best Regards,
    Gi-Sung Jang

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 20, 2017 at 02:46 PM

    Before posting this, I also tried what you propose, it does not like it and gives a syntax error for with.I have not been able to find anything on the subject in IQ documentation.

    I overcome the problem in a dirty way:

    - got the titles first into the output file

    - and append the data to the file.

    I just want to make sure if the functionality exists in Sybase IQ and if yes why it doe snot work for me, is it a matter of settings?

    Add comment
    10|10000 characters needed characters exceeded

    • The statement Gi-Sung Jang posted is valid für SQL Anywhere. Tagging your question with both SAP IQ and SAP SQL Anywhere left it open to assumptions, what you're using. You might want to remove the SAP SQL Anywhere tag, if that's not the product your question was aimed at.