| Author |
Message |
rgelb
Joined: 25 Sep 2008 Posts: 26
|
Posted: Wed Feb 13, 2013 7:59 pm Post subject: Can "Format SQL" not throw JOIN conditions on the next line? |
|
|
I have the following code:
| Code: |
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:
| Code: |
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? |
|
| Back to top |
|
 |
eddie davis
Joined: 14 Jun 2006 Posts: 796 Location: Red Gate Software
|
Posted: Wed Feb 20, 2013 2:03 pm Post subject: |
|
|
Hi rgelb
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 _________________ Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com |
|
| Back to top |
|
 |
rgelb
Joined: 25 Sep 2008 Posts: 26
|
Posted: Wed Feb 20, 2013 6:06 pm Post subject: Re: |
|
|
| eddie davis wrote: |
Does the advice in this help ARTICLE provide the answer to your question?
|
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? |
|
| Back to top |
|
 |
eddie davis
Joined: 14 Jun 2006 Posts: 796 Location: Red Gate Software
|
Posted: Mon Feb 25, 2013 2:58 pm Post subject: |
|
|
Thank you for your reply.
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 _________________ Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com |
|
| Back to top |
|
 |
rgelb
Joined: 25 Sep 2008 Posts: 26
|
Posted: Mon Feb 25, 2013 8:25 pm Post subject: Re: |
|
|
| eddie davis wrote: |
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?
|
Those items were already disabled. Just for fun, I re-enabled them, then disabled them again - unfortunately no result. |
|
| Back to top |
|
 |
andy.campbell.smith
Joined: 20 Oct 2011 Posts: 124 Location: Red Gate Software
|
Posted: Tue Mar 12, 2013 8:53 pm Post subject: |
|
|
Just following up on this - I've been playing around with SQL Prompt, and I can't find a way to configure SQL Prompt to not do this. I think your best bet right now is to log a feature request on our UserVoice forum here:
http://redgate.uservoice.com/forums/94413-sql-prompt-feature-suggestions
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! _________________ Andy Campbell Smith
Red Gate Technical Support Engineer |
|
| Back to top |
|
 |
|