The following two statements work perfectly well in Interactive SQL version 10.0.1

SELECT * FROM sales_Transactions; 
OUTPUT TO 'C:\\Accounts\\DailySales.xls';

However, I can not add them to a procedure or event (SyBase Central 5.0.0.3278). The problem is in the OUTPUT statement, if I delete it a procedure saves.

What may be the reason and how can I schedule an export of SELECT result?

Many thanks,

asked 23 Mar '12, 12:52

MsAverage's gravatar image

MsAverage
45114
accept rate: 0%

edited 26 Mar '12, 08:45

Volker%20Barth's gravatar image

Volker Barth
29.5k291441646


OUTPUT TO is an Interactive SQL statement and does not get executed by the database server. You can, however, export data with the database server by using the UNLOAD TABLE statement:

UNLOAD TABLE statement

permanent link

answered 23 Mar '12, 13:05

Tyson%20Lewis's gravatar image

Tyson Lewis
2.2k1641
accept rate: 22%

4

... or use the UNLOAD SELECT statement as a method to output arbitrary formatted data (i.e. not just table data).

(23 Mar '12, 13:13) Mark Culp
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:

×72
×24

question asked: 23 Mar '12, 12:52

question was seen: 1,082 times

last updated: 26 Mar '12, 08:45