Hi,
I would like to use sp_rename but with a variable to name the new table.
For example,
exec sp_rename 'table_1','table_OLD'
I would ideally like to replace the "OLD" with:
convert(varchar(50), getdate(),112)
which would append the date to the rename table.
This throws up errors. I have tried nesting this in a @sql = '' but with little luck.
Thanks
Dave