Active Query Builder support area

The GlobalIndent seems to have no effect

Avatar
  • updated
  • Completed

The GlobalIndent seems to have no effect

The IndentInPart does have an effect and indents the From parts a bit

Ideally in the future you want an indent for the subquery as a whole i.e everything between the brackets

SELECT F1,G2
FROM xyztable
Inner join .....
left join
-----(Select j1,y2
-----From
-----Where)
Where .... etc

Not urgent

Avatar
Andrew Kennard

Thanks for this

As far as I am concerned this is fixed for now

Any improvements in the wrapping logic would be welcome but not vital

Please can you now comment on my other two threads

Thanks

Avatar
Andrey Zavyalov, PM

ActiveQueryBuilderX.SQLFormatRightMargin - set it to zero. Menwhile I will check if wrapping could work in another way.

Avatar
Andrew Kennard

I can see insert video, picture and link but nothing for file ?

If I paste it in here it looses the formatting

I've taken some screen grabs and attached as pictures, I hope you can see them

The indenting doesn't have to be EXACTLY like the second picture BUT I don't want to see anything in column 1 other than Select, From and Where of the main outer query

Thanks

Current output


Desired output

Avatar
Andrey Zavyalov, PM

You can send it here. Hopefully you can attach it to your comment, can't you?

Avatar
Andrew Kennard

Thanks very much

What email address should I send it to ?

Avatar
Andrey Zavyalov, PM

Well, if you want to solve this problem, please send us a text file with full text of SQL query generated by Active Query Builder and a query text with desired formatting.

Avatar
Andrew Kennard

Thanks for continuing to look at this.

I have tried your settings and although it changed the output the fundamental problem of things wrapping back to column 1 as explained above still remains

Whilst I would like this to work it is not as important to me when compared with the other two threads I replied to

Thanks again

Avatar
Andrey Zavyalov, PM

FromNewLineAfterDatasource = false
FromNewLineAfterJoin = true
FromNewLineBeforeComma = false
FromNewLineBeforeJoinExpression = false
MainPartsFromNewLine = true
NewLineAfterPartKeywords = false
SelectNewLineAfterItem = false
SelectNewLineBeforeComma = false
IndentInParts = 2
IndentGlobal = 0
SQLFormatFrom.IndentGlobal = 8

Isn't it a configuration that suits your needs?

Avatar
Andrew Kennard

Just replaced above spaces with dashes so you can see layout as this forum removed the spaces

Avatar
Andrew Kennard

Thanks I have had a play with some of those and others and they do make the SQL iutput different but none of them appears to stop this type of wrapping in a subquery


--Left Join (Select qvwCampaignLinks.Contact_Ref As Contact_Ref,
qvwCampaignLinks.ID As Journal_Number
------------From qvwCampaignLinks
------------Where qvwCampaignLinks.[Key] In ('DON0002')
------------Union All
------------Select qvwCampaignLinks.Contact_Ref As Contact_Ref,
qvwRegularGivingPayments.Journal_Number As Journal_Number
------------From qvwCampaignLinks
--------------Inner Join qvwRegularGivingPayments On qvwCampaignLinks.ID =
qvwRegularGivingPayments.Agreement_Number