Is ddl in tran turned on and is it possible that it was something like this:
begin tran
create table #a1
select * from #a1, p1
....
Is ddl in tran turned on and is it possible that it was something like this:
begin tran
create table #a1
select * from #a1, p1
....