[Bug] when using IN() and hit comma, prompts to add field

mbourgonmbourgon Posts: 32 Bronze 2
I want to write an IN clause like this:
select * from blah where id in (11235,345632,3463453,663634)
When I write the code, I set up the in, paste in the list, then add commas. So it looks like:
select * from blah where id in (
11235
345632
3463453
663634)

However, when I hit the comma after "1", it prompts me to add a field from blah. Which makes no sense - syntactically it won't work, and it means after each comma, I have to hit escape, then down-arrow, then comma/escape/down-arrow. Yes, I could ALT+mouseselect to add all of them at once, but for a short list it's much quicker to leave my hands on the keyboard.

Could SQL Prompt detect when you're in an IN, and not bring up suggestions?
Tagged:

Comments

  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi and thanks for your post!

    At the moment, the column picker still comes up for the IN because there are cases where users may use a subquery within the IN clause.

    We do realize, however, that most of the time users will be providing a list of literals rather than subqueries. Can you please add a request to our uservoice forum for an option to disable the column picker for IN clauses? That will give other users a chance to vote on this as well. Our forum is located here: https://redgate.uservoice.com/forums/94413-sql-prompt

    Thank you!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Sign In or Register to comment.