I'm trying to output a file to a shared folder, I can make the output but I can't run it on a event/Stored Procedure. The code snippet that I have to the output is this:
But when I include this in a event, the sybase gives me this error. [Sybase][ODBC Driver][SQL Anywhere]Syntax error near 'output' on line 2 SQLCODE: -131 SQLSTATE: 42000 SQL Statement: ALTER EVENT "dba"."Export" HANDLER BEGIN select * from table1; output to 'c:\teste.txt' format text with format text with COLUMN names END I am using Sybase Central with sql anywhere 12 |
The OUTPUT statement is implemented by dbisql only. For an Event Handler to do something similar, it would need to use an UNLOAD. V12 and higher versions can UNLOAD from a query. |