• opc.three (4/1/2013)


    I'll give you the @objtype change as something to be corrected, and the second as I just reread ap_rename. Now, how to deal with multiple schemas??

    Without testing, does the new table name keep the old table name's schema?

    Yes. Schemas are handled the way mine was written. No need to re-qualify anything. The @objname finds the object, and the @newname is the new name of the object within that schema.

    Good. I don't use sp_rename often and actually everything in our databases here resides in the dbo schema.

    Now, just hit myself over the head a few times with this information and perhaps it will reach the long term memory where I will have no trouble recalling.