btw Scott's comment #2 in line is something I fall for all the time, creating an object that gets saved with a schema as something other than dbo, so it sorts way up in the top/bottom of the table list, giving the appearenace it doesn't exist.
>Just out of curiosity, everyone is using sys.objects, how about sys.tables?
In this case we didn't know that "spSmartPrinting_pre_update" could be a table.
bkrenzin
ASKER
OK... do I dropped the table successfully.. but when I cut and paste my SQL statement it still underlines the table name in the script..
So.... i executed the DROP TABLE command at the bottom of the above image and you can see the results in the messages tab.
bkrenzin
ASKER
Thought I might check to see if table exists with select statement.
The table will be created only if you have at least one record on spSmartPrinting table.. You could use the 'Debug' functionality in SSMS to see step by step execution
Scott Pletcher
You should add a statement to see if the table exists, and if it does, to DROP it.
IF OBJECT_ID('SBM01.._spSmartPrinting_pre_update') IS NOT NULL
DROP TABLE SBM01.._spSmartPrinting_pre_update
bkrenzin
ASKER
Thank You Gents!!!
Really appreciate your help and time this afternoon.
select * from sys.objects where name = 'xxx'