cancel
Showing results for 
Search instead for 
Did you mean: 

OUTPUT does not work in procedures/events

Former Member
3,440

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,

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member

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

MarkCulp
Participant

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