Skip to Content
0

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

Dec 19, 2017 at 10:02 PM

87

avatar image
Former Member

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?
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

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

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Dec 20, 2017 at 02:46 PM
0

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?

Show 1 Share
10 |10000 characters needed characters left 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.

0