I have a long query that I'd like to replace the , with a carriage return to put all the fields on their own line but I can't figure out how to do it in the editor. It wont be fool proof, but better than doing it by hand.
views:
261answers:
3
+2
Q:
How do I search for a ', ' and replace with ', '<CR><LF> in SQL Server Management Studio's editor
+3
A:
CTRL+H
Find what: ', ' (No Quotes)
Replace With: ', \n' (No Quotes)
Expand the Find options and tick the Use Regular Expressions checkbox.
Jason Punyon
2009-10-12 18:48:15
+1
A:
do a find/replace. you want to find a , and replace with a ,\n (new line). to use \n check the box at the bottom called "Use:" and then from the dropdown choose "Regular expressions".
thomas
2009-10-12 18:48:39
A:
Check the 'Use regular expressions', search ro \,
and replace it with ,\n
Remus Rusanu
2009-10-12 18:51:56