DADE links using parameterized SQL and manual crafted sql for detail dataset
Hi,
When using the option Parameterized SQL with a manual crafted detail sql
statement, the generated sql is often not correct. See attached example:
Detail sql statement:
select l.id, l.transport, l.pakbonnr, l.datum, l.leveradres,
l.orderdeel, l.medewerker, l.gewicht, l.notitie,
d.omschrijving orderdeel_oms, l.contactpersoon,
l.pallets, l.randen, l.kisten,
coalesce(o.klant, ko.klant) klant
from levering l
inner join orderdeel d
on (l.orderdeel = d.id)
left outer join klantorder ko
on (d.klantorder = ko.id)
left outer join opdracht o
on (l.opdracht = o.id)
where l.transport = :id
when the link is added, reportbuilder adds 'Where (TRANSPORT = :ID)'
resulting in
a) syntactical incorrect sql (two times 'where')
b) Ambiguous field names because transport is a field name used in
multiple tables
I would like the option that a linked query is not changed by
reportbuilder and is ran with every master record movement.
A combination of the current 'Parameterized SQL' and 'Manual SQL' if you
like.
Using RB14.08.
Kind regards,
Jeroen Röttink
JR-soft software solutions
When using the option Parameterized SQL with a manual crafted detail sql
statement, the generated sql is often not correct. See attached example:
Detail sql statement:
select l.id, l.transport, l.pakbonnr, l.datum, l.leveradres,
l.orderdeel, l.medewerker, l.gewicht, l.notitie,
d.omschrijving orderdeel_oms, l.contactpersoon,
l.pallets, l.randen, l.kisten,
coalesce(o.klant, ko.klant) klant
from levering l
inner join orderdeel d
on (l.orderdeel = d.id)
left outer join klantorder ko
on (d.klantorder = ko.id)
left outer join opdracht o
on (l.opdracht = o.id)
where l.transport = :id
when the link is added, reportbuilder adds 'Where (TRANSPORT = :ID)'
resulting in
a) syntactical incorrect sql (two times 'where')
b) Ambiguous field names because transport is a field name used in
multiple tables
I would like the option that a linked query is not changed by
reportbuilder and is ran with every master record movement.
A combination of the current 'Parameterized SQL' and 'Manual SQL' if you
like.
Using RB14.08.
Kind regards,
Jeroen Röttink
JR-soft software solutions
This discussion has been closed.
Comments
Thanks for the feedback, I will add this to the requested feature list.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com