[Solved] Smart alignment -- ON plus AND/OR

20 Posts
3 Users
0 Reactions
4,777 Views
Guido
Posts: 295
Admin
(@admin)
Member
Joined: 5 years ago

... and please remove the linebreak before "ON"


Reply
5 Replies
(@hwmonkey)
Joined: 2 years ago

Member
Posts: 7

@admin I did one quick test. My assumption was that all of the ON statements would align. That is not what happened.

select
    *
FROM dbs.clr_tdl_tran ttr
    INNER JOIN dbs.ptr pat ON ttr.int_pat_id                   = pat.pat_id
                          and 1                                =1
    LEFT OUTER JOIN dbs.valid_ptr vpat ON pat.pat_id           = vpat.pat_id
    INNER JOIN dbs.account a           ON ttr.account_id       = a.account_id
    INNER JOIN dbs.clr_ser ser         ON ttr.performing_pr_id = ser.emm_pr_id
                               or ttr.dog                      = ser.cat
    INNER JOIN dbs.clr_ser bser ON ttr.billing_prider_id       = bser.emm_pr_id
    INNER JOIN dbs.clr_dep dep  ON ttr.dept_id                 = dep.department_id

Reply
Guido
Admin
(@admin)
Joined: 5 years ago

Member
Posts: 295

@hwmonkey I see there is still an issue in the alignment logic. I will have to fix this.


Reply
(@hwmonkey)
Joined: 2 years ago

Member
Posts: 7

@admin  - Thank you. It is good work.


Reply
Guido
Admin
(@admin)
Joined: 5 years ago

Member
Posts: 295

@hwmonkey please try the new Release 6.25.1.15

grafik

Reply
(@hwmonkey)
Joined: 2 years ago

Member
Posts: 7

@admin,

I had it attack one of the most difficult to read sections of a query I had open and .... it performed BEAUTIFULLY on the JOIN section. Mark this request as 'complete.'

 

Thank you


Reply
Guido
Posts: 295
Admin
(@admin)
Member
Joined: 5 years ago

When you hover over the checkboxes there appears a Tooltip. The first box is generally "Linebreak before" and the 2nd box is for "Linebreak after"

grafik

Reply
Page 2 / 2
Share: