If you're like most people, you probably spend a lot of time editing your SQL code in Microsoft SQL Server Management Studio
Did you know that you can use find and replace functionality to speed up the process?
Here's how
6. Make sure the SQL code is still
selected
Make sure the Regular Expressions
option is also selected
7. You can see the selection highlight
orange, ready to be replaced
Type n into the first box
Make sure that the second (Replace)
box is empty, then click Replace All
8.
9. This has replaced the new line
character, but there is also a
carriage return character
10. Type r into the first box
Click replace all again
11. You may also need to remove
spacings, just use the technique
to remove six spaces
12.
13. With these find a replace shortcuts you can easily make your SQL code
much more compact to read
Hope you find this useful
14. For more Tips, Tricks and
Timesavers, visit our website
Business Analytics Blog – Select Distinct
Credit: simon.harrison@selectdistinct.co.uk