Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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 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

accept rate: 0%

edited 26 Mar '12, 08:45

Volker%20Barth's gravatar image

Volker Barth

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
accept rate: 22%


... 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



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: 23 Mar '12, 12:52

question was seen: 3,086 times

last updated: 26 Mar '12, 08:45