When you create MBOs from Adaptive Server® Enterprise stored procedures that use temporary tables, you must select the AutoCommit check box in the New Attributes or New Operation definition screen.
CREATE PROCEDURE dbo.ase_sp
AS
BEGIN
create table tempstores (temp_row_id integer, temp_id integer )
insert tempstores select 1, 1
insert tempstores select 2, 2
insert tempstores select 3, 3
select temp_row_id, temp_id from tempstores group by temp_row_id
drop table tempstores
END
If this stored procedure is used to model an MBO (attributes and operations), when you
preview an operation, this error message displays:
The 'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database.