Sql query formatting in one line only

Asked

Viewed 159 times

-4

In some cases, when we save a query. sql, even if it is indented correctly in the SSMS when we open in the Notepad (windows) all the text is in one line, joining END with GO (ENDGO) at the end of a change in the process (for example).

How to solve this?

  • Could you speak a little more of what your doubt is?

  • If it is in the menu format > automatic line break. It looks like you want? I just don’t understand the doubt either.

  • Sorry, I posted this question, why this problem occurred here at the company. I have answered only to leave registered rsrs... vlw

1 answer

0


In some cases, it could be the operating system. In Windows enter generates a special character "CR LF" but in MAC enter generates only "CR". In Windows, "CR" does not work as line break.

In the Notepad++ it is possible to check these line breaks by searching for the regular expression " r[ n]", using this regular expression you will find special characters "CR".

Browser other questions tagged

You are not signed in. Login or sign up in order to post.