 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
benpage
Joined: 10 Aug 2011 Posts: 6 Country: United States |
|
[SA Beta 6] Error during Refactoring - Rename Column |
|
Using the Rename Column refactoring function produces invalid SQL. This is what I see in the preview window:
declare @objname varchar(255) = '['+ :REFACTORING_SCHEMA+'].['+:REFACTORING_OBJECT+'].['+:REFACTORING_OLD_NAME+']'
EXEC sp_rename @objname, :REFACTORING_NEW_NAME, 'COLUMN'
|
|
Wed Aug 10, 2011 12:46 pm |
|
 |
benpage
Joined: 10 Aug 2011 Posts: 6 Country: United States |
|
|
|
It also generates the wrong code for updating stored procedures. Specifically, if there is an table alias used in a stored procedure that has the same name as the column being renamed, it will change the table alias. This could cause a naming conflict.
|
|
Wed Aug 10, 2011 12:52 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Thank you for your feedback. Would you please provide a code snippet or a screenshot of the refactoring dialog with the procedure for which the 'rename column' refactoring generates invalid command?
Based on your description, it sounds like the refactoring is struggling to determine correct schema name or object name or something else might be at play, some settings converted from an old SQL Assistant version might be incompatible. I hope the preview of your code would allow us to figure out the root cause.
As for the table or alias having the same name as the column being renamed or column being queried, this is a know issue which we are going to address as soon as we can, but not likely to happen in the initial 6.0 release.
|
|
Wed Aug 10, 2011 2:54 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|