hankinsoft / SQLPro

SQLPro bug & features tracking.
106 stars 28 forks source link

MSSQL Autocomplete with "Database..Table" as a shortcut for "Database.dbo.Table" #877

Closed kgleason closed 1 year ago

kgleason commented 1 year ago

Is your feature request related to a problem? Please describe. Using .. as a shortcut for the default schema in Microsoft SQL Server has been a thing since at least SQL 2005. Given that, I've got ~20 years of habit of not typing out the schema name, since 90% of the time I am operating in the default schema.

To be clear, I can type out a query manually using the ".." syntax, but there's no autocomplete.

There are a few different cases that this affects:

In all those cases, replacing ".." with ".dbo." causes the autocomplete to behave exactly as expected.

Describe the solution you'd like It would be awesome if this ".." shortcut worked in SQL Pro Studio like it does is most other MSSQL query editors.

Describe alternatives you've considered Currently, I wait for the auto complete to pop up, and then get frustrated when it doesn't, or when it shows the wrong object types. Then I replace the .. with .dbo. and the autocomplete comes up. And I move on. I am also considering a keyboard text replacement in macOS to simply replace ".." with ".dbo." but I'm leery of that solution because of the lack of context for keyboard text replacements. I don't think I type ".." outside of SQL, but I can't be sure.

Additional context I've been using SQLPro Studio now for a couple of months, and this is the only real issue I've had. In general, it works like a champion and has been well worth the money.

kgleason commented 1 year ago

I'm currently using SQL Pro Studio Version 2022.77 (Build 110948) that I installed from Homebrew (I think). I'm running Ventura 13.1 on a 2020 M1 Macbook Pro.

hankinsoft commented 1 year ago

I'm not quite getting 100% what you're saying. I was wondering if you would possible be able to post a video from Microsoft SQL Management studio showing what you mean?

(I'm stuck between do you want to write database..table and have it be with database.dbo.table or if you want to write database..table and have autocomplete know that database..table IS database.dbo.table). A picture or video would be best.

kgleason commented 1 year ago

https://user-images.githubusercontent.com/2130628/220449961-4410b7ca-b43b-49f2-824a-9889e8339d5f.mov

Here you go. A quick walk through of how it works in Azure Data Studio, which is the same as SSMS.

hankinsoft commented 1 year ago

Hmmmm ok. I'll be investigating this hopefully next week and evaluate how difficult it would be for adding it.

kgleason commented 1 year ago

I'm happy to test any pre-production builds if it helps out.

hankinsoft commented 1 year ago

SQLPro Studio 2023.15 was just approved on the App Store about an hour ago. It usually takes up to 24 hours for it to propagate, but if you check App Store updates this might already be available.

kgleason commented 1 year ago

It works! Thanks so much.