Need to cross-join results in a dbjoin element

mirceat

Member
Hello,

I know that i can use subqueries as a condition for a dbjoin element to search in another table(s) (ex: {thistable}.id IN (select field from another table), but the subquery will return distinct values and i need to return all the rows.

For example, running this kind of query in database will return the desired result:
Code:
select a.parent_id as value, a.denumire_camp as text
from contracte_setari_739_repeat a
join contracts_tool_servicii b on a.parent_id = b.abonament
where b.id_contract_main = 123457967
order by b.abonament
and the result is (note the duplicates for the text "Dynamic Smart National")
join.jpg


While using a subquery like this

Code:
SELECT parent_id as value, denumire_camp as text
from contracte_setari_739_repeat
WHERE parent_id IN (
    SELECT abonament
    FROM contracts_tool_servicii
    WHERE id_contract_main = 123457967  
)

will return distinct values:
subquery.jpg

can i do it with Fabrik and dbjoin element?

Thank you
 
I'm not sure what you are asking.

Do you need the join element to display the duplicate rows? If so, that won't work. The join element is designed around displaying unique id's (values).

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top