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 |
pascal_jimi
Posting Yak Master
167 Posts |
Posted - 2013-06-14 : 07:06:38
|
IF @GO=1BEGIN SELECT A INTO #WS_DEPTS1 FROM TABLE1ENDELSEBEGIN SELECT A INTO #WS_DEPTS1 FROM TABLE2ENDMsg 2714, Level 16, State 1, Procedure ParseXmlPersonInfo, Line 155There is already an object named '# WS_DEPTS1' in the database.kmkmmm |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
pascal_jimi
Posting Yak Master
167 Posts |
Posted - 2013-06-14 : 07:22:56
|
thank you visakhmcan examples ?kmkmmm |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-06-14 : 07:37:09
|
[code]CREATE TABLE #WS_DEPTS1 (A <datatype same as that in TABLE1>)IF @GO=1BEGININSERT #WS_DEPTS1 SELECT A FROM TABLE1ENDELSEBEGININSERT #WS_DEPTS1 SELECT A FROM TABLE2END[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|