Hi

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

Jongee
18791218
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:

HTH

permanent link

answered 17 Nov '16, 12:42

Mark%20Culp's gravatar image

Mark Culp
23.3k9132275
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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×101
×39
×25

question asked: 17 Nov '16, 12:05

question was seen: 350 times

last updated: 18 Nov '16, 03:14