Left Join unioned group query

Answered

Comments

6 comments

  • Avatar
    Minieggs

    This is what my object tree looks like and I cant work out how to get something into Main at the top and Left Join it with the Union and give the Union a name and an On condition

    Thanks


    0
    Comment actions Permalink
  • Avatar
    Minieggs

    OK I can now see it is probably derived tables just need to work out if the join and name will work

    0
    Comment actions Permalink
  • Avatar
    Minieggs

    OK I have got this to work.

    Are there any properties that would indent my derived table a bit more ?

    eg

    Select Something From myBigTable
    Left Join (Q
    union all
    Q
    union all Q)

    etc

    0
    Comment actions Permalink
  • Avatar
    ActiveDBSoft support team

    You should try to increase IActiveQueryBuilderX.SQLFormatFrom.IndentInPart value,

    it defines the indentation size for derived queries

    0
    Comment actions Permalink
  • Avatar
    ActiveDBSoft support team

    Seems IActiveQueryBuilderX.SQLFormatFrom.GlobalIndent is more suitable.

    It indents entire derived table, not only inner parts.

    0
    Comment actions Permalink
  • Avatar
    Minieggs

    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

    0
    Comment actions Permalink

Please sign in to leave a comment.