Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

One of our systems was using an older version of SQL Anywhere and when I would run a query with the FORMAT TEXT option like this

select * from tblmed; output to e:\temp\med.txt format text

I would get a fixed width file with headers and ------'s under the headers indicating the column width. I also wrote a script to use those output files in a custom reporting system.

After a recent upgrade that same query producing a comma separated file with no headers. Is there a way to get the old fixed with output back?

I know I can rewrite the script but I would like to avoid that if possible.

Thanks in advance,


asked 20 Dec '11, 14:45

mmcgrego's gravatar image

accept rate: 0%

Interesting... we had a request for that old format recently and issued a fix. If you're not the one who requested the fix, it's another case of the phenomenon where requests or bug reports tend to come in groups :) Note that the fix below addresses dbisqlc -- I'm not sure what the java dbisql does.

SA Bug Fix: QTS 692617(OTW): fixed-width output with column headings was lost when ASCII renamed to TEXT

Versions Affected: and later
Modules Affected: dbisqlc

Fixed In:,


When we renamed 'ASCII' to 'TEXT' for the dbisqlc OUTPUT_FORMAT option, we lost the ability to generate the old format that dbisqlc called 'TEXT' which was fixed-width with column headers. Now, setting the OUTPUT_FORMAT to 'COLUMNS' will generate the old TEXT format.

permanent link

answered 20 Dec '11, 14:56

John%20Smirnios's gravatar image

John Smirnios
accept rate: 37%

edited 27 Dec '11, 09:14

Volker%20Barth's gravatar image

Volker Barth

No, I didn't submit a different request...glad I'm not alone though. When I use 'COLUMNS' i get an error that that format is not valid. Like dbisqlc 11.0.1 build 2467 - I presume an upgrade is in order?

(20 Dec '11, 16:59) mmcgrego
Replies hidden

Yes, an upgrade is in order: "Fixed In:,"

(21 Dec '11, 07:36) John Smirnios

For DBISQL, the following command line will probably get you close:

select * from tblmed > e:\temp\med.txt

When run in a command window, DBISQL prints result sets to the console with column names and a long line of dashes as you described. I recognize that it does not achieve your goal of not having to change your script files.

permanent link

answered 03 Jan '12, 08:36

Chris%20Irie's gravatar image

Chris Irie
accept rate: 46%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 20 Dec '11, 14:45

question was seen: 4,556 times

last updated: 03 Jan '12, 08:36