SQL Prompt suggestions order
jonathan.lee
Posts: 4 Bronze 2
Is there a way to sort the SQL Prompt suggestions by closest match instead of in alphabetical order? (shortest to longest match would be the next best sort order).
(I had a longer post I tried to preview and lost it when prompted to re-login. Let me know if you want me to clarify what I mean by closest match. I have a screenshot if you have a place I can upload/send it to in an email).
Jonathan Lee
(I had a longer post I tried to preview and lost it when prompted to re-login. Let me know if you want me to clarify what I mean by closest match. I have a screenshot if you have a place I can upload/send it to in an email).
Jonathan Lee
Comments
There is currently no way to do this in Prompt. Currently, our order is prefix match, then camel case matching, then checking if what is typed is anywhere else in the name of the suggestion.
If you could clarify closest match, that would be great. Do you mean number of characters that match?
If you have the time, please do add this to our feature suggestion site. We use this to gauge interest in various features and prioritise development of them.
We also have another suggestion to rank suggestions by frequency of use. Would that help in your situation?
Best regards,
David
Here are a few example based looking up a table name with the initials of "tcd" (while typing the FROM clause of a SELECT statement):
Note: I've added square brackets around each matching, highlighted letter per the screenshot of the SQL Prompt suggestions.
Another example, for a substring match, "stand" with no exact match (if one exists, it should be listed first, of course):
Within each type of match, the content could be sorted alphabetically for matches with prefixes and suffixes and from shortest to longest for intervening content (could be number of words instead of total number of characters, one long word like "_temperature_" vs. two short words "_exit_lp_").
With the few (abbreviated) examples I gave, you might think this is much ado about nothing but when there are 20-40 match suggestions and the one you want is near the bottom of the list but should be been an exact match, it is a real pain.
I hope this explanation is clearer. I will add this as a suggestion for new features.
Thanks,
Jonathan
Thank you for clarifying this and posting it on the UserVoice forum! I'll be taking a good look at this on Monday and see if we can optimise how we show suggestions.
Best regards,
David