Question

I'm looking for a plugin for Notepad++ (or any other tool) that could provide me following:

Before applying pluging

SELECT * FROM Cars LEFT JOIN Driver ON Cars.Id = Driver.Id WHERE Cars.Brand = "Mercedes"

After applying pluging with keywords Left an Where

SELECT * FROM Cars 
LEFT JOIN Driver ON Cars.Id = Driver.Id 
WHERE Cars.Brand = "Mercedes"
Was it helpful?

Solution

You could use a regex in the replace tool:

Find what: [^\r\n](WHERE|LEFT)
Replace with: \n$1

or Replace with: \r\n$1

OTHER TIPS

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top