Auto inserting "INSERT" statement and ad-hoc queries
aplocher
Posts: 6
I think it would be a great feature for when SQL Prompt adds your insert statement (e.g. when you type "INSERT INTO tablename"... it autocompletes), for the autocompletion to place your text cursor in the first field. If it's a varchar, your cursor would be placed within the quotes. Ideally, the user should be able to tab through the fields too, similar to the way VS allows for those types of actions with their code snippets (cycling through a list of fields).
I'm not sure if Management Studio / SQL Prompt is able to do the same, but I'm constantly undoing or hitting escape so it won't auto complete. I really should just turn it off, but i think it could be a very useful feature if it didn't add more work for me. As a keyboard jockey, I feel like I have to move my text cursor with precision in between the quotes of each field, when typing '', is easier for me. When I'm doing dozens or more of these queries daily, I need something to speed up the process, not slow it down - even if it's just a few seconds here and there.
Does SQL prompt have this ability? If not, has it been considered?
Thank you!
-Adam
I'm not sure if Management Studio / SQL Prompt is able to do the same, but I'm constantly undoing or hitting escape so it won't auto complete. I really should just turn it off, but i think it could be a very useful feature if it didn't add more work for me. As a keyboard jockey, I feel like I have to move my text cursor with precision in between the quotes of each field, when typing '', is easier for me. When I'm doing dozens or more of these queries daily, I need something to speed up the process, not slow it down - even if it's just a few seconds here and there.
Does SQL prompt have this ability? If not, has it been considered?
Thank you!
-Adam
Comments
Thanks for the post! This sounds like a great idea. I'll look into implementing the simple version of selecting the first field for you now.
For your ideal solution we might not be too far off being able to implement it. We're currently working on adding the ability to cycle through fields in a snippet using tab and I see no reason why it couldn't be added here too. We're using UserVoice to help us keep of track feature requests, could you post this idea there? (This'll allow other users to view/vote on it and allow us to send updates to everyone who's interested in it's progress)
Thanks!
Aaron.
We've included the simple version of this in our 6.5 beta which you can download from the forum post here. Please let us know if this works as you'd expect.
Thanks,
Aaron.
And ... what a pleasant surprise! I just loaded up the latest 6.5 (which is apparently no longer beta) and now I see the cursor positioned inside the first column value of the insert statement. That's HUGE (IMO). Just to confirm, there is no current method of cycling through the fields, right?
Regardless, thank you so much. That little change has made this go from being a mild nuisance to being a serious time saver for me! And I'll level-up again if/when I can cycle through the fields lol
I really appreciate the quick response and implementation. I will use the user voice stuff in the future if I have a feature request. Thanks!
I'm glad to hear it works well for you! We've haven't implemented cycling through the fields with tab yet but hopefully it's not too far off.
Thanks,
Aaron.