Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

connect multiplie tables with more then once the same key.

Hi,

I try to connect 3 tables together, with only 2 different keys that exists in the 3 tables. (see screenshot)

I already connected them one way, but still need to connect the Contactpersons to the company table with the contact_id key.

The problem is, when I make that connection , a loop or syntactic key will emerge aAnd my QV app will freak out.

How can I achieve my last connection: to connect the Contactpersons to the company tables with the contact_id key.

Regards.

3 Replies
Not applicable

connect multiplie tables with more then once the same key.

Hi Simon,

first shot: Join the eMail addresses into the ContactPerson table.

Rainer

alal
New Contributor II

connect multiplie tables with more then once the same key.

Prinicipaly, i try to get around loops by having the joining key in all the tables. Sometimes i make the tables join on a dummy, hard coded key. But in your schema that won't work.

Try This:

Add person id to the companies table (maybe just left join to the contacts table and bring the contact's person_id in). You will then get Person Id & Contact Id as join keys between all 3 tables. There will be no loops anymore and your app should work.

Not tested this. So don't bite my head off if it doesn't work.

MVP
MVP

AW:connect multiplie tables with more then once the same key.

Simon,

normally I would expect that a company table has one record per company (for each company) and a company_id is stored in the person table as a reference (foreign key). In this case you would'nt need to have a contact_id in the company table and everything goes fine in QV.

In your case you have a huge amount of redundant data in the company table...

If this structure resides in your database than you can transform this via SQL in the load script.

Ralf

Community Browser