Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Gabo77
Contributor III
Contributor III

Between clause in join from two loaded tables

I'm trying to join 2 loaded tables. The relation between them, is by Date, but in the first table we have a specific date meanwhile in the second one, we have a range. In SQLServer this can be solved using

"Where A.Date Between B.FromDate And B.ToDate"

Is there a way to do this in Sense Script??...

Labels (1)
4 Replies
MayilVahanan

Hi Gabo,

Try with intervalmatch concept like below 

https://community.qlik.com/t5/QlikView-App-Dev/inner-join-tables-between-date-range/td-p/656740

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
chriscammers
Partner - Specialist
Partner - Specialist

IntervalMatch is a viable solution but it is memory and cpu intensive. When your data volumes are high you may find that intervalmatch will take a very long time to process. There are a couple of ways to tune the process by doing the interval match manually.

The join can be accomplished using a two step process

Claims:
Load * Inline [
MemberID,TransactionDate,Amount
];

Left Join(Claims)
//Enrollment
Load * Inline [
MemberID,EnrollmentSequence,BeginDate,EndDate,Limit
];

Inner Join(Claims)
Load
   MemberID,
   TransactionDate,
   BeginDate,
   EndDate
Resident Claims
Where TransactionDate >= BeginDate and TransactionDate <= EndDate
Gabo77
Contributor III
Contributor III
Author

Hi!... i'm gonna check it... Thanks!!

Gabo77
Contributor III
Contributor III
Author

Looks good!!.... Thanks!!