Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

vishnus85
Contributor

Require help with Join syntax for resident tables

Hi,

I am facing a problem with joining two resident tables in qlikview.

Table A has fields

SlNO

START_DATE

STOP_DATE

Table B has fields

SINO

ADMIT_DATE

I want to join the bigger table A to smaller table B such that, B would be joined to A on

SINO

and only when B.ADMIT date between A.START_DATE and A.STOP_DATE

Kindly guide me.

Regards,

Vishnu S

1 Solution

Accepted Solutions
Employee
Employee

Re: Require help with Join syntax for resident tables

This is exactly what IntervalMatch does. See more here:

http://community.qlik.com/blogs/qlikviewdesignblog/2013/04/04/intervalmatch

HIC

5 Replies
hectorgarcia
Contributor III

Re: Require help with Join syntax for resident tables

Have you tried intervalmatch????

Sent from my iPhone

eduardo_sommer
Valued Contributor

Re: Require help with Join syntax for resident tables

Maybe this:

TempTable:

Load SINO,

START_DATE,

STOP_DATE

Resident TableA;

join (TempTable)

  Load SINO,

          ADMIT_DATE

  Resident TableB;

FinalTable:

Load SINO

Resident TempTable

Where ADMIT_DATE >= START_DATE

  And  ADMIT_DATE <= STOP_DATE;

Drop Table TempTable;

After this lines, you will have three tables. The original Tables TableA and TableB, plus a new table, FinalTable, with only one field SINO, containing those SINO whose ADMIN_DATE is between START_DATE and STOP_DATE. All three tables linked by field SINO.

I hope this helped you

Eduardo

Employee
Employee

Re: Require help with Join syntax for resident tables

This is exactly what IntervalMatch does. See more here:

http://community.qlik.com/blogs/qlikviewdesignblog/2013/04/04/intervalmatch

HIC

eduardo_sommer
Valued Contributor

Re: Require help with Join syntax for resident tables

Yes, Henric

I realized that after sending my answer.

Thank you

Eduardo

vishnus85
Contributor

Re: Require help with Join syntax for resident tables

Thanks Henric and Eduardo !!

Community Browser