Can "Format SQL" not throw JOIN conditions on the next line?
rgelb
Posts: 46 Bronze 4
I have the following code:
Whenever I run Format SQL, it throws the second JOIN condition onto a new line:
I messed with the Options but couldn't find a way to keep both conditions on the same line. Is it possible? If so, how?
select p.x1, g.x2 from pTable p join gTable g on p.EmpID = g.EmpID and p.SiteID = g.SiteID
Whenever I run Format SQL, it throws the second JOIN condition onto a new line:
select p.x1, g.x2 from pTable p join gTable g on p.EmpID = g.EmpID and p.SiteID = g.SiteID
I messed with the Options but couldn't find a way to keep both conditions on the same line. Is it possible? If so, how?
Comments
Does the advice in this help ARTICLE provide the answer to your question?
The article explains how to create your custom style and use it in your code.
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
Eddie, that's the point. I messed around with styles but I couldn't get it not to throw the second compare of the join onto a separate line.
Could you do it?
Can you please check to see if you have the following SQL Prompt Options enabled?
SQL Prompt 5 ->Options ->Format ->Data statements ->New Lines (to the right) ->Place the following on a new line: ->Join condition and Align join condition with JOIN.
If you have "Join condition" and "Align join condition with JOIN" options enabled, can you please disable these options and recheck to see if your join statement follows the style you have set?
Many thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
Those items were already disabled. Just for fun, I re-enabled them, then disabled them again - unfortunately no result.
http://redgate.uservoice.com/forums/944 ... uggestions
If you wouldn't mind spending a few minutes voting on other features you'd like to see in the product we'd really appreciate it - we like UserVoice, because it lets us make sure the work we're doing is important and relevant to what our users are looking for. Sorry I can't help more right now!
Red Gate Technical Support Engineer