How to set commas position by "Copy as IN clause"?
ahdung
Posts: 28 Bronze 2
in SQL Prompt
When i use "Copy as IN clause":
and got this result:
I hope the commas at before, like this:
What should i do? thanks.
and got this result:
I hope the commas at before, like this:
What should i do? thanks.
Tagged:
Answers
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