1

I am trying to insert the data into temp table from stored procedure. For instance

Insert into TempTable
EXEC dbo.MyProcedure(CustomerID)

In SQL Server it worked fine but in Sybase ASE 16 it gives me error:

Incorrect syntax near the keyword 'EXEC'.

Can you advice is it possible or a workaround?

  • `insert/exec` is not supported in Sybase/SAP ASE; two options I can think of ... code the proc to insert directly into the temp table (either hardcoded temp table name or possibly pass temp table name to proc, have proc create/execute a dynamic `insert` statement) ... use `create existing table` to map a proxy table to the output from the stored proc, then run `insert temptable/select from proxytable` – markp-fuso Nov 25 '21 at 13:42

0 Answers0