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 |
|
david_reinjal
Starting Member
36 Posts |
Posted - 2006-06-16 : 02:22:42
|
| hi guys, i have a code which has views and tables. i am trying to drop the table but i am geting an error. the code is:DROP TABLE dbo.sp and the error that i am getting is: Cannot drop the table 'sp', because it does not exist or you do not have permission. |
|
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2006-06-16 : 02:29:56
|
quote: Originally posted by david_reinjalDROP TABLE dbo.sp
This is the MOST interesting name for a TABLE I have ever seen in my whole career ;-) I think the DB itself is confused whether it is a SP or a table!Do the following, 1. Try to do the same with Query analyzer.2. Use the proper DB.3. Syntax is correct, you may not have drop permission.------------------------I think, therefore I am - Rene Descartes |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-06-16 : 02:31:07
|
| Make sure if it exists in the databaseWhat does this return?Select top 1 * from dbo.sp MadhivananFailing to plan is Planning to fail |
 |
|
|
CSK
Constraint Violating Yak Guru
489 Posts |
Posted - 2006-06-16 : 02:36:00
|
| Use The Object Browser And Choose ur db and Find out ur table (sp) if it's availabe in dbo or any other owner then drop itinto like if Exists (Select 'x' from owner.sysobjects Where type ='u' Begin Drop table Owner.sp EndAnd One more suggession:use the proper naming cnvension |
 |
|
|
|
|
|