Open match-gabeflores opened 2 years ago
@match-gabeflores Thanks for the idea.
Hello @match-gabeflores,
Have you considered using the Templates feature?
hi @ShadelessFox , that's a SQL snippet feature which is different than what I'm asking.
See example below. Often times, there's a complicated query but I want to quickly analyze a table (or even a section of it). I can do so using the keyword shortcuts defined in my original post just by highlighting the table name. What happens behind the scenes, it runs the SELECT TOP 1000 * FROM <selected SQL>
or whatever I define in the shortcut. Very convenient without having to type any SQL
https://user-images.githubusercontent.com/286903/213303224-17387a02-a9a2-4220-b005-3cb281a7374e.mp4
example 2 - selecting multiple tables with joins and iteratively getting count through each where condition
https://user-images.githubusercontent.com/286903/213304740-fd5711c0-bade-4c50-a7a2-c0d40e35d866.mp4
You can have a similar behavior by pressing F4 (you will see the selected table structure and the first 200 rows in the "Data" tab).
@match-gabeflores did you find something that works? I am also desperately looking for this feature. Its very handy.
You can vote for the issue with the 👍🏻 emoji under the issue description to promote it to a higher priority.
bump
Is your feature request related to a problem? Please describe. Say I have a query like below:![image](https://user-images.githubusercontent.com/286903/161597229-6e713e2d-f543-44e9-a0ec-59e1b6c82cb7.png)
I want to be able to select a table (
store.subscription_event_types
in the example) and right-click on it (or use some keyword) and have it execute aSELECT TOP 100 * FROM store.subscription_event_types
.In SSMS, I'm able to do something like this using a keyword shortcut and it's very handy to take a quick peek at a table.
Describe the solution you'd like After highlighting a table, execute a custom query (i think top N will be the most common) using either a context menu item or keyword shortcut. My preference is keyword shortcut so as to not bloat the context menu.
I'm not sure of the entire scope or implementation. I just have my simple use case which I currently use multiple times a day in SSMS.
Describe alternatives you've considered I don't know of any alternatives.
Additional context This is what I have in SSMS (no-addins). I use Top 100 and count(*)![image](https://user-images.githubusercontent.com/286903/161599328-0dc73ec6-098b-4570-89ae-4d1ebf2c098d.png)
SSMSBoost (an extra add-in) uses a whole separate macro implementation that is very powerful and almost limitless but also much more complicated. https://www.ssmsboost.com/Features/ssms-add-in-simple-macros