Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Outer join to a constant

edited February 2006 in General
Hello

I am building a report by code (D7 RB 903 Oracle).
I am using TdaSQLBuilder to manipulate the SQL of the report at runtime.
I have two tables which must be linked in outer join with several
conditions, some of them are with constants. E.g.

select *
from a_master a left outer join a_det d
on a.id = d.ca_det
and d.dt_ini <= to_date('1/1/1999', 'dd/mm/yyyy')
and nvl(d.dt_fin,'1/1/3000') >= to_date('1/1/1999', 'dd/mm/yyyy')

(In this example 1/1/1999 is the constant
nvl and to_date are Oracle function)

I see that TdaSQLSelectTables.AddLeftOuterJoin is expecting two
FieldNames list.
May it accept a constant instead of a fieldname?

Thanks in advance
Bye
Nicola

Comments

  • edited February 2006
    Hi Nicola,

    Unfortunately DADE does not allow joining on constant values. The
    TdaSqlBuilder basically follows the same rules as the Query Designer. It
    was in fact created just to make the manipulation of queries in DADE easier
    to manage in code. This is something we may look at for a future
    enhancement.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2006
    Hi Nico,


    Nico Cizik (Digital Metaphors) ha scritto:


    This is something we may look at for a future

    I will be very interested in this enhancement, but will be any
    subversion available for us after the 9.03 ?
    For now I resolved encapsulating the constant in the sql view (so the
    constant becamed a field), but I think it would be a useful feature
    which can add flexibility to the product

    Bye
    Nicola
  • edited February 2006
    Hi Nicola,

    Thanks for your feedback.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.