Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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];
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.
the common field should have the same name in both tables, using alias.
take a look at this:
Really !!!
of course i can not change the schema of database so what can i do in this case .
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];
u just rename the fields by 'as' like mentionned by Andrea.
Got it.
Thanks.
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.