Red Gate forums :: View topic - Formatting after JOIN
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Prompt 6
SQL Prompt 6 forum

Formatting after JOIN

Search in SQL Prompt 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
Arcom



Joined: 04 Apr 2014
Posts: 2

PostPosted: Fri Apr 04, 2014 10:10 am    Post subject: Formatting after JOIN Reply with quote

When using SQL Prompt > Format SQL when using the JOIN statement the table name and join condition are indented and placed on the next line (which is my preference).

If I user an INNER JOIN, LEFT JOIN or RIGHT JOIN however, the table name and join condition are placed immediately after the join statements on the same line.

Is it possible to force the INNER JOIN etc. formatting to behave the same way as JOIN?
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 248
Location: Red Gate Software

PostPosted: Fri Apr 04, 2014 2:33 pm    Post subject: Reply with quote

Hi Arcom,
I'm not sure I'm seeing the same behaviour you've described when I try it here. Would it be possible to post a small script that shows what you're currently seeing and how you'd like it instead?

Thanks,
Aaron.
Back to top
View user's profile Send private message
Arcom



Joined: 04 Apr 2014
Posts: 2

PostPosted: Fri Apr 04, 2014 3:14 pm    Post subject: Reply with quote

Hi Aaron,

SELECT * FROM Dept d INNER JOIN Employee e ON d.DeptId = e.DeptId

reformats to

Code:
SELECT
   *
FROM
   Dept d
INNER JOIN Employee e ON d.DeptId = e.DeptId


whereas

SELECT * FROM Dept d JOIN Employee e ON d.DeptId = e.DeptId

reformats to

Code:
SELECT
   *
FROM
   Dept d
JOIN
   Employee e ON d.DeptId = e.DeptId


My preference is for the latter, but I can't find an option to set this

Thanks

Andy
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 248
Location: Red Gate Software

PostPosted: Fri Apr 04, 2014 4:32 pm    Post subject: Reply with quote

Thanks for the example!

I've logged this request as SP-5079 in our internal tracking system. We will be looking to improve the flexibility of the formatting system in Prompt in the future so this request will be helpful when we consider the list of rules.

If you have any more suggestions please feel free to post them here!

Thanks,
Aaron.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group