Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

chandu441
New Contributor III

Join Functionality Problem

Here in the show script you can find two main tables Event and Intervals.

If I try to merge the both tables in the data model it is working succesfully. In data model we can see one resultant table

But while I'm trying to merge the both Resident tables it is not showing the resultant table

It is still showing two separate tables as Event , Intervals

//Join Prefix

Event:

LOAD EventID,

     Date(Date#(EventDate,'YYYY-MM-DD'))as MyDate

FROM

(txt, utf8, embedded labels, delimiter is '\t', msq);

Intervals:

LOAD IntervalID,

     Date(Date#(IntervalEnd,'YYYY-MM-DD'))as ToDate,

  Date(Date#(IntervalBegin,'YYYY-MM-DD'))as FromDate

FROM

(txt, utf8, embedded labels, delimiter is '\t', msq);

//// ============ Merge two resident tables using a join ============

Temp:

Load

  EventID,

  MyDate

  Resident Event;

Join

Load

  IntervalID,

  ToDate,

  FromDate

  Resident Intervals;

Plz solve my issue

Thanks Inadvance

Tags (2)
2 Replies
rakesh_kumar
Contributor

Re: Join Functionality Problem

If you want to join you need to have an ID field on which you will be joining.

General Syntax:

Table1:

Load * from QVD1.qvd(QVD);

left join (Table1)

Load * from QVD2..qvd(QVD);

If you just want to concatenate make sure you have the field names same or at least 80% same for performance sake and use 'concatenate' key word.

MVP
MVP

Re: Join Functionality Problem

usually to join 2 tables you use at least 1 common field (common = same field name)

but in your question I guess you want to join using an interval match prefix

here the details

IntervalMatch

Community Browser