Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jens_haase
Contributor
Contributor

How to assign a value from an interval record into a single record??

Hello there,

i'm trying to get concrete values from an interval Table B to  single records in Table A.

jens_haase_0-1678352355682.png

Table A has hundred thousends of records, Table B tenthousands.

Intervalmatch doesn't work here or i didn't understand that funcion. I tried an Bridgetable but there are hundred of millions record in it and the application runs out of memory. 

It would be nice if anyone has an idea how i get solve this problem. 

Best Regards Jens

 

 

Labels (3)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Refer Below example; Join Result tableB to tableA

 

TableA:
Load * inline [
Person,Date,Order
A,2023-01-15,ABC
A,2023-02-16,DEF
A,2023-03-15,GEH
B,2023-01-15,ABC
];


TableB:
Load * inline [
Person,FromDate,ToDate,Value
A,2023-01-01,2023-01-31,1
A,2023-02-01,2023-12-31,2
B,2023-01-01,2023-12-31,1
];


Inner Join IntervalMatch (Date,Person)
Load FromDate,ToDate,Person
Resident TableB;


Left Join(TableA)
Load Person,Date,Value

Resident TableB;


Drop table TableB;


Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

3 Replies
vinieme12
Champion III
Champion III

use IntervalMatch()

https://help.qlik.com/en-US/qlikview/May2022/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptP...

 

TableA:

Load Person,Date,Order

From XyzSource;

 

TableB:

Load From,To,Value

From AbcSource;

 

Inner Join  IntervalMatch(Date,Person)

Load From,To,Person

Resident TableB;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
jens_haase
Contributor
Contributor
Author

Hi, thanks for your Reply.

If i do that so, i  get a syntable.

jens_haase_2-1678427267370.png

After droping TableA there's no more longer a syntable but i lost the orderinformation and additional information from TableA.  I don't need the intervals.  I need single information from there in my Ordertable (TableA), because there are a lot of additional data wich i have to use in the further script.

vinieme12
Champion III
Champion III

Refer Below example; Join Result tableB to tableA

 

TableA:
Load * inline [
Person,Date,Order
A,2023-01-15,ABC
A,2023-02-16,DEF
A,2023-03-15,GEH
B,2023-01-15,ABC
];


TableB:
Load * inline [
Person,FromDate,ToDate,Value
A,2023-01-01,2023-01-31,1
A,2023-02-01,2023-12-31,2
B,2023-01-01,2023-12-31,1
];


Inner Join IntervalMatch (Date,Person)
Load FromDate,ToDate,Person
Resident TableB;


Left Join(TableA)
Load Person,Date,Value

Resident TableB;


Drop table TableB;


Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.