I am trying to delete a global temp table in the stored procedure.
I've used stmt like below but it doesn't work. I replaced #temp_table with ##temp_table but still doesn't work. Anybody knows what I should do?
if exists (select * from sysobjects where id = object_id(N'[dbo].[##temp_table]')
and OBJECTPROPERTY( object_id('#temp_table'),'ISTABLE') = 1)
drop table ##temp_table
Thanks.
I've used stmt like below but it doesn't work. I replaced #temp_table with ##temp_table but still doesn't work. Anybody knows what I should do?
if exists (select * from sysobjects where id = object_id(N'[dbo].[##temp_table]')
and OBJECTPROPERTY( object_id('#temp_table'),'ISTABLE') = 1)
drop table ##temp_table
Thanks.