Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

yamananalytic
Contributor II

Inner Join Condition

Hi guys,

I have two tables :EventTimeLine and EventTimeLineDetails and i want to make inner join between them when ID "Which is the id of EventTimeLine table" and EventTimeLineID which is the foreign key links to EventTimeLine table.


i can write :

inner Join (EventTimeLine) Load * Resident [EventsTimelineDetail];


Where can i put the condition which is : when ID = EventTimeLineID


i hope it is clear.


stalwar1

swuehl

Tags (1)
1 Solution

Accepted Solutions
agigliotti
Honored Contributor II

Re: Inner Join Condition

just changing the script a little bit as below:

EventTimeLine:

LOAD

...

ID as %Key

EventsTimelineDetail:

LOAD

...

EventTimeLineID as %Key

inner Join (EventTimeLine) Load * Resident [EventsTimelineDetail];

8 Replies
omarbensalem
Esteemed Contributor

Re: Inner Join Condition

rename the 2 fields as the same

I mean ID and EventTimeLineID should have the same name; that, implicitly, will tell qlik the inner join will be done by these 2 fields.

agigliotti
Honored Contributor II

Re: Inner Join Condition

the common field should have the same name in both tables, using alias.

omarbensalem
Esteemed Contributor

Re: Inner Join Condition

take a look at this:

QlikView Joins

yamananalytic
Contributor II

Re: Inner Join Condition

Really !!!

of course i can not change the schema of database so what can i do in this case .

agigliotti
Honored Contributor II

Re: Inner Join Condition

just changing the script a little bit as below:

EventTimeLine:

LOAD

...

ID as %Key

EventsTimelineDetail:

LOAD

...

EventTimeLineID as %Key

inner Join (EventTimeLine) Load * Resident [EventsTimelineDetail];

omarbensalem
Esteemed Contributor

Re: Inner Join Condition

u just rename the fields by 'as' like mentionned by Andrea.

yamananalytic
Contributor II

Re: Inner Join Condition

Got it.

Thanks.

omarbensalem
Esteemed Contributor

Re: Inner Join Condition

If you have any quetsion, don't hesitate.

If your quesiton has been answered, please close the thread by marking the correct answer as so.