Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ivanss11
Starting Member
2 Posts |
Posted - 2001-03-18 : 10:39:14
|
| Hi all,I try to a simple stored procedure that creates a temporary table and have problem.I tray this example:CREATE PROCEDURE TEST9 ASdeclare @strTemp1 varchar(300)set @strTemp1 = "create table #MYTABLE( id int, id1 int ) "print @strTemp1exec (@strTemp1)set @strTemp1 = "select * from #MYTABLE "print @strTemp1exec (@strTemp1)return(0)The result is :exec TEST9create table #MYTABLE( id int, id1 int ) select * from #MYTABLE Server: Msg 208, Level 16, State 1, Line 1Invalid object name '#MYTABLE'.Any Ideas ? I try without exec (@strTemp1) and all is OK, but I neeed to make my procedure with exec. |
|
|
|
|
|