Click to run pinned queries
I often find myself in a scenario where I am doing something like:
1. Mock some data (SQL query)
2. Perform a front end action as though I'm a user
3. Check some data (SQL query)
4. Alter a procedure (SQL query in a different window)
5. Repeat
I think it would be nice if I could pin the mock/check queries to a window in the side of the manager so that I could click to run them instead of having to click in them then shift+f5 or whatever. And even more nice not having to have a second editor window open for the ALTER PROCEDURE.
Other use cases involve:
1. Preserve some record
2. Alter the record
3. Do a bunch of stuff
4. Revert the change to the record
In this case, I'd normally have a query window open that has the reversion script, but it'd be nice if I could just pin it so that I don't close it or forget it.
I also have a handful of scripts that I run very frequently. Right now I type the first few characters of the snippet and press F5. But clicking would also be nice to be able to do.
Other times I'm working on one procedure and referencing several different objects. It'd be nice to have those laid out to the side instead of having to keep track of which tab has which object.
And so on.
The easier to pin, unpin, and edit a pinned query, the better.
-
Jeff Humphreys commented
I've wanted this for when I'm editing a view or procedure, and I run the same query or exec after them. Currently I just have the exec or query in a separate window split and jump over and run after I rebuild the object.
Eventually, when I get tired of this I just put the test command after the GO in the same query window. Every build, the test query(s) get run.But a pinned query that could just be run would often be helpful. Shows contents on hover. Where would the output go, if any?