Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

1 Solution

Accepted Solutions
agigliotti
MVP
MVP

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];

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it

View solution in original post

8 Replies
OmarBenSalem
Partner - Champion II
Partner - Champion II

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
MVP
MVP

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

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
OmarBenSalem
Partner - Champion II
Partner - Champion II

take a look at this:

QlikView Joins

Anonymous
Not applicable
Author

Really !!!

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

agigliotti
MVP
MVP

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];

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
OmarBenSalem
Partner - Champion II
Partner - Champion II

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

Anonymous
Not applicable
Author

Got it.

Thanks.

OmarBenSalem
Partner - Champion II
Partner - Champion II

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.