Found a bug in SQL Prompt

Provides intelligent code completion for SQL Server editors.

Found a bug in SQL Prompt

Postby PaulShearing » Wed Apr 02, 2014 11:58 am

Not sure if this is fixed in 6.3 but. If you rename a database field that is mentioned in an UPDATE() statement in a trigger, the field is not renamed correctly. Note this is the UPDATE([Fieldname]) syntax that returns true if a field has been updated, not the UPDATE [Table] SET [Fieldname] = xyz syntax for performing a database update.

For example, rename a field [Alpha] to [Alpha123]. In an Update trigger for the table containing this field is the statement:

IF UPDATE([Alpha])
do some SQL stuff

This is checking to see if [Alpha] has been modified by the table update and of course it should be changed to IF UPDATE([Alpha123]) ... but it isn't and thus it causes the smart rename transaction to fail. Other references to [Alpha] within the trigger procedure are renamed correctly, looks like Prompt needs to check within an UPDATE() statement.

Hope this helps
Posts: 1
Joined: Wed Apr 02, 2014 11:46 am
Location: Caterham, Surrey UK

Postby David Priddle » Wed Apr 02, 2014 2:47 pm

Hi Paul,

Thanks for the bug report!

We've managed to reproduce this here (it looks like it's not being recognised as a dependency).

We've logged this issue internally with an ID of SP-5076.

Best regards,

David Priddle
Posts: 147
Joined: Tue Jan 28, 2014 9:22 am
Location: Red Gate Software, Cambridge

Return to SQL Prompt

Who is online

Users browsing this forum: No registered users and 1 guest