SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[SA Beta 6] Error during Refactoring - Rename Column

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[SA Beta 6] Error during Refactoring - Rename Column
Author Message
benpage



Joined: 10 Aug 2011
Posts: 6
Country: United States

Post [SA Beta 6] Error during Refactoring - Rename Column Reply with quote
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 View user's profile Send private message
benpage



Joined: 10 Aug 2011
Posts: 6
Country: United States

Post Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
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 View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.