Comments
6 comments
-
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 Not work, I say "Copy as IN clause", you can try.
-
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
-
well, i suggest you add this feature, thanks.
-
Hi @ahdung ,Please do add it to our UserVoice forum which is monitored by our Product Managers.
Cheers,
Pete Ruiz
-
@Pete_Ruiz Ok, thank you, have a good day.
Add comment
Please sign in to leave a comment.
and got this result:
I hope the commas at before, like this:
What should i do? thanks.