How can we help you today? How can we help you today?

How to set commas position by "Copy as IN clause"?

When i use "Copy as IN clause":

and got this result:

I hope the commas at before, like this:

What should i do? thanks.
ahdung
0

Comments

6 comments

  • Pete_Ruiz
    Hello @ahdung ,

    Thanks for reaching out and sorry for the trouble with SQL Prompt. You can do this with a custom formatting style. In SQL Prompt>Formatting styles>Global>Lists please select the option to Place commas before items.



    Then in SQL Prompt>Formatting styles>Expressions>IN please select the option to Place subsequent values on new lines so that the values are treated as items in a list.



    Save and set the custom formatting style as active and you should get a similar result to the one below after you format the SQL code:



    Please note that this only applies after you format the code and there isn't a way to paste the code in this format. If you would like the ladder, I would suggest adding this to our UserVoice forum:
    https://redgate.uservoice.com/forums/94413-sql-prompt

    I hope this helps. Please let me know if there are any further questions.

    Kind regards,

    Pete Ruiz

    Pete_Ruiz
    0
  • ahdung
    @Pete_Ruiz Not work, I say "Copy as IN clause", you can try.
    ahdung
    0
  • Pete_Ruiz
    Hi @ahdung .

    So sorry, I could've been more clear. There isn't currently a way to change the format in the 'Copy as IN clause.' What I was referring to previously is that after you use the 'Copy as IN clause' feature and paste the values in the query window, you could then use our custom formatting feature to then place the commas before the values.

    I hope this helps. Please let me know if there are any further questions.

    Kind regards,

    Pete Ruiz
    Pete_Ruiz
    0
  • ahdung
    well, i suggest you add this feature, thanks.
    ahdung
    0
  • Pete_Ruiz
    Hi @ahdung ,

    Please do add it to our UserVoice forum which is monitored by our Product Managers.

    Cheers,

    Pete Ruiz

    Pete_Ruiz
    0
  • ahdung
    @Pete_Ruiz Ok, thank you, have a good day.
    ahdung
    0

Add comment

Please sign in to leave a comment.