The forum will be unavailable for maintenance at some point from Friday, April 13 at 19:00 EDT until Sunday, April 15 at 23:59 EDT. Downtime will be minimized but the exact timing is unknown.


I am trying to write a Stored Procedure in ASA9 with an OUTPUT TO statement. The reason I want to use OUTPUT TO instead of UNLOAD is I am wanting to export the file as HTML.

Is this possible?

asked 17 Nov '16, 12:05

Jongee's gravatar image

accept rate: 0%

FWIW, this question is a common one - in addition to Mark's answer, you will find more samples in this forum when searching for the "output" tag...:)

(18 Nov '16, 03:13) Volker Barth

The OUTPUT statement is a dbisql[c] statement and is not known by the server, and therefore you cannot use it in a stored procedure. There are two alternatives that you can use in a stored procedure:

Check out the documentation for more details - the links that I have provided are for SQLA 17 but the same will work on v9 (except for UNLOAD TO CLIENT FILE - this feature does not exist in v9).

In more recent versions you can also use:


permanent link

answered 17 Nov '16, 12:42

Mark%20Culp's gravatar image

Mark Culp
accept rate: 40%

edited 17 Nov '16, 12:49

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: 17 Nov '16, 12:05

question was seen: 612 times

last updated: 18 Nov '16, 03:14