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 |
|
AsimKhaliq
Yak Posting Veteran
94 Posts |
Posted - 2003-12-10 : 22:58:08
|
| hiiam dropping a temp table , what i have to do is to check that if tyable exist then drop it. when I am running this command I dont have any error but the when still exists. Can some one help me. I cant use 'Use tempdb' thingif exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[##temptab1]')and OBJECTPROPERTY(id, N'IsTable') = 1)drop Table[dbo].[##temptab1]Thanks in advanceAsim |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-12-10 : 23:01:21
|
| if exists (select * from tempdb.dbo.sysobjects where id = object_id(N'tempdb.[dbo].[##temptab1]')But if other connections that use it are still open it won't drop.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
AsimKhaliq
Yak Posting Veteran
94 Posts |
Posted - 2003-12-10 : 23:15:21
|
| thankscan i check, if user is connected.Asim |
 |
|
|
|
|
|