Options

Copy from Suggestion / Script Object as Alter

Nikos226Nikos226 Posts: 14 New member
edited January 16, 2020 4:09AM in SQL Prompt
Hello,

So I love the suggestion feature where I'm able to type in an object and the code appears to copy. Home run with this feature I can't thank you enough for it.

I was wondering if it would be possible to expand on it though.

Here is a sample. I'm looking to alter an object, let's say a stored proc...
  1. I usually begin by typing EXEC <name> to trigger the suggestion for stored procs to give me the object.
  2. Once the suggestion finds the object, the script contents appears in a side window.


  1. Using the COPY button in the right corner, I copy the next and paste to my current session window (overriding the previous EXEC <name> statement)
  2. However I still need to change the CREATE statement to an ALTER statement.
Then I remember that I can use F12 to Script Object as ALTER. That's great, however it opens the object in a new window.

Have you ever been buried with so many tabs opened that are either pinned/not pinned during business hours? It sometimes becomes a (slight) problem when you see numerous SQLQueryXX.sql tabs listed and you have to remember to go back and close the previous one that you used to trigger the suggestion.

So my question - would it be possible to have an ability to have something like a COPY AS ALTER button, similar to the COPY button in the screenshot? 

The functionality is already there, you'd just be adding a nice convenient button that would really be appreciated!

Thank you for your consideration. 
Tagged:

Answers

Sign In or Register to comment.