bikerboy718
Programmer
I am trying to change the object owner of a table if the table exists where a certain user is the owner.
For example
IF exists db1.user1.table1
sp_changeobjectowner 'db1.user1.table1', 'user2'
When I use the exists key word i keep getting an error message. Can anyone direct me in fixing this up? Any help is greatlu appreciated.
Michael
For example
IF exists db1.user1.table1
sp_changeobjectowner 'db1.user1.table1', 'user2'
When I use the exists key word i keep getting an error message. Can anyone direct me in fixing this up? Any help is greatlu appreciated.
Michael