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 |
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2009-11-25 : 02:53:12
|
how can i check if the temporary table exists tnas delete iti write this ,but it is not found my table even that table is existIf Exists (Select * From Sysobjects Where Name Like N'#Table') Drop Table dbo.#Table |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-11-25 : 02:55:30
|
| If Exists (Select * From tempdb..Sysobjects Where Name =N'#Table') Drop Table dbo.#TableorIf object_id('tempdb..#Table') is not nullDrop table #tableMadhivananFailing to plan is Planning to fail |
 |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-11-25 : 02:55:42
|
| HiTemp tables are exists only in Tempdb...why need to check the temp table are exists or notTemp table is live only the current session .-------------------------R... |
 |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2009-11-25 : 04:18:28
|
| i found if i crreate a temporary table like #T so , in the sysobjects table is save as'#T__________________________________________________________________________________________________________________000000000464' |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-11-25 : 04:24:26
|
quote: Originally posted by inbs i found if i crreate a temporary table like #T so , in the sysobjects table is save as'#T__________________________________________________________________________________________________________________000000000464'
Yes. But have you tried what I replied?MadhivananFailing to plan is Planning to fail |
 |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-11-25 : 04:29:41
|
| UseIf object_id('tempdb..#Table') is not nullDrop table #tableSenthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-11-25 : 04:31:49
|
quote: Originally posted by senthil_nagore UseIf object_id('tempdb..#Table') is not nullDrop table #tableSenthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/
Have you seen my first reply? MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|