BUG: ALTER PROCEDURE doesn't include all of the text

Provides intelligent code completion for SQL Server editors.

Moderators: Anu Deshpande, Aaron Law, David Priddle

BUG: ALTER PROCEDURE doesn't include all of the text

Postby Airn5475 » Tue Jul 08, 2014 6:44 pm

If type in ALTER PROCEDURE and select a Stored Procedure in the list, the code preview pop up will come up and display the stored procedure text including any comments before "CREATE PROCEDURE".

If I hit TAB the Stored Procedure text will be inserted into the document, however, it does not include comments before ALTER PROCEDURE.

Can this please be corrected? We often times have our Author, Date Created and Change History text in comments before the stored proc.
Airn5475
 
Posts: 5
Joined: Tue Sep 21, 2010 3:48 pm
Location: Sterling, OH

Postby Aaron Law » Wed Jul 09, 2014 10:03 am

Hi Airn5475,

It looks like this might have been originally designed to work like that in Prompt, possibly because it was considered odd to insert text before the current line and potentially scroll forwards or just to make it consistent with the rest of the code that Prompt inserts (they all overwrite the current word and append the extra text)

I can see how this would be annoying if you're relying on the comments before the stored procedure to be preserved. I'll have a look into this today and see if it's a simple change to make. Otherwise, we currently have a feature request on UserVoice here, so please do add your vote as we use the votes to help prioritise what to work on next.

A possible work around would be to use the Script as Alter feature (F12) which will keep the comments.

Thanks,
Aaron.
Aaron Law
 
Posts: 262
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software

Postby Airn5475 » Wed Jul 09, 2014 1:06 pm

Hi Aaron,
Thanks for the quick response. I knew I should have looked in UserVoice first. You guys do a great job of maintaining that list and pulling items off of it! I figured this was more of a bug and not a feature, so I didn't look there first. I have upvoted the item accordingly.

I do agree that it may seem weird to have the comments appear before the text I'm working on. What's worse is when those comments are lost!

Thanks for the reminder about F12, I some how had forgotten about that!

Thanks for checking into this.

-Aaron
Airn5475
 
Posts: 5
Joined: Tue Sep 21, 2010 3:48 pm
Location: Sterling, OH

Postby Aaron Law » Thu Jul 10, 2014 11:05 am

Hi Aaron,

Things are looking good - we've got a version of this working without having to drastically change the insertion system and it doesn't feel odd that the comments are inserted before the cursor. We'll do some more testing on it over the next few days and hopefully should be able to include it in a beta build next week. I'll let you know if there's any more developments.

Thanks,
Aaron.
Aaron Law
 
Posts: 262
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software

Postby Aaron Law » Fri Jul 18, 2014 2:09 pm

This should now be in the latest beta build (6.4.0.300) let me know if you come across any problems with it!
Aaron Law
 
Posts: 262
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software

Postby Airn5475 » Fri Jul 18, 2014 4:13 pm

Hey Aaron,
I downloaded the beta and the functionality works as expected.

Thanks for getting this in there!

-Aaron
Airn5475
 
Posts: 5
Joined: Tue Sep 21, 2010 3:48 pm
Location: Sterling, OH


Return to SQL Prompt 6

Who is online

Users browsing this forum: No registered users and 0 guests

cron