Temp tables

Last Post 18 Oct 2006 11:20 AM by werice. 0 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
werice
New Member
New Member

--
18 Oct 2006 11:20 AM
query 1
I have a query:
select fieldse into #temp01 from table

The problem is, I set up an option

qurey2
if @variable = option
select * into #temp from #temp01
else
select * into #temp from #temp03



The problem is query 2 gives me the error:
There is already an object named '#temp' in the database.

it looks like query2 condition 2 is having a problem becasue query 2 option 1has declared #temp table.

Is there a way to surrpress this so that when the proc is compiled I do not get this error?

Thanks Bill






You are not authorized to post a reply.

Acceptable Use Policy