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 |
|
whatamouth
Starting Member
16 Posts |
Posted - 2011-12-29 : 10:07:00
|
Hi, can anyone help me out with this one.I'm kind of stuck I need to use an sp_rename inside an exec() clause. declare @test_char vharchar(4) SET @test_char varchar = 'ABC123'exec ('exec sp_rename "table", "table"+@test_char')Executing the script above would return this message >Msg 102, Level 15, State 1, Line 1Incorrect syntax near '+'.Wondering if how would I concatenate the new table name and the variable @test_charThanks in Advance! Neil Matiasneilmatias@yahoo.com |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|