Link same table twice
Hello all,
With RB 7.03 D5 we are trying to link the same dataset twice but the
query generated is wrong.
The data structure is something like this
master table: M_STEP
--------------
id_start_step
id_end_step
First detail table: A_STEP
---------------------------
id
Second detail table: S_STEP
-----------------------------
id_step
dt_start
dt_end
We need to join M_STEP with A_STEP twice (one for
M_STEP.ID_START_STEP=A_STEP.ID
and another for
M_STEP.ID_END_STEP=A_STEP_2.ID)
Then we need to join each copy of A_STEP with
corresponding copy of S_STEP as in
S_STEP.ID_STEP = A_STEP.ID
S_STEP2.ID_STEP = A_STEP_2.ID
RB instead generates a where like this:
S_STEP.ID_STEP = A_STEP_2.ID
S_STEP2.ID_STEP = A_STEP_2.ID
As you can see one of the links is wrong.
Thanks in advance
Bye
Nicola
With RB 7.03 D5 we are trying to link the same dataset twice but the
query generated is wrong.
The data structure is something like this
master table: M_STEP
--------------
id_start_step
id_end_step
First detail table: A_STEP
---------------------------
id
Second detail table: S_STEP
-----------------------------
id_step
dt_start
dt_end
We need to join M_STEP with A_STEP twice (one for
M_STEP.ID_START_STEP=A_STEP.ID
and another for
M_STEP.ID_END_STEP=A_STEP_2.ID)
Then we need to join each copy of A_STEP with
corresponding copy of S_STEP as in
S_STEP.ID_STEP = A_STEP.ID
S_STEP2.ID_STEP = A_STEP_2.ID
RB instead generates a where like this:
S_STEP.ID_STEP = A_STEP_2.ID
S_STEP2.ID_STEP = A_STEP_2.ID
As you can see one of the links is wrong.
Thanks in advance
Bye
Nicola
This discussion has been closed.
Comments
I think you are encountering the limitations of the query builder.
Are you trying to link queries or build one query with SQL joins?
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
I tried to create a similar query. Looks like once you link the same table
in twice to first the master, then link dialog lists the same table name
twice rather than listing the table SQL alias.
I think you will have to manually edit the SQL text to get the correct SQL.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
(and we need them in this report).
So we used our usual workaround: we built an SQL view with the desired
join and used it in RB
My purpose, actually, was to ask if are there any patches or plans for
fix it in future releases?
We can add it the list of requested enhancements so that it will considered
for the next release.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Can you create a view? so you can use the view and the table
Otherwise you can create 3 datapipeline (master and 2 detail)
If you want to create a unic datapipeline, isn't possible. Fortunally my job
was to autofill table and field of querybuilder, so i have created my own
function: but i had to make public some private function...
"Nicola Farina" ha scritto nel messaggio