Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

How to combine table batch master and table rate master based on wef date and weto date

Dear all

Please refer attached excel sheet My requirement is   to combine table batch Master  with rate master

based on effective dates from and effective dates , How I can do the same in sql or qlikview.

Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
15 Replies
abeyphilip
Creator II
Creator II

Vikas,

With product code as third common field? I have created the same assuming this.

How it works is:

you do interval match using the these fields:

Date field that you do interval match on.

Then the common fileds

eg: - INTERVALMATCH (EFFDATE,PROD_BATCH,PROD_CODE)

Then include all those common fields and date range from the date range table.

left join (Batch_Master)

INTERVALMATCH (EFFDATE,PROD_BATCH,PROD_CODE)

LOAD

distinct PB_EFF_FROM,

PB_EFF_TO

,PROD_BATCH,

PROD_CODE

RESIDENT Rate_Master;

Then you can left join the rest of the fields separately.

If the issue is still there then please post the QVW that your are trying with inline data (no QVDs) and I will try to fix on that.

Rgds,

Abey

vikasmahajan
Author

Hii

Please find my qvw attached where I am Going wrong.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Not applicable

Try this. I've put notes in the script.

Andy

vikasmahajan
Author

Hello

please note my requirement is to  combine both tables based on  wef from & Wef to dates along with batch nos

base on common key product code. 01/11/2007 and product 1ytd have batch  (YD 2K7B)  should display PB_NBR (45.14)

this should merged.

PROD_CODEPROD_BATCHPDSDEDPB_NBR
1YD1NULL01/11/200730/09/200845.14
1YD1NULL01/10/200901/03/201046.3
1YD1NULL02/03/201001/07/201046.77
1YD1YD 2K7B01/11/200701/11/200730/09/2008
1YD1YD 2L7B01/11/200701/11/200730/09/2008
1YD1YD 3F7B01/11/200701/11/200730/09/2008
1YD1YD 3F8B01/10/200901/10/200901/03/2010
1YD1YD 3G8B02/03/201002/03/201001/07/2010
1YD1YD 3H7B01/10/200901/10/200901/03/2010
1YD1YD 4E6V02/03/201002/03/201001/07/2010
Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Not applicable

The problem may be in your base data. It is hard to get a complete solution without looking at that. Can you attach it and send it across so I can see what data you’re trying to join?

Andy Myers

Business Systems Analyst

APPH

8 Pembroke Court, Manor Park, Runcorn, Cheshire, WA7 1TG, England

Tel. +44 (0) 1928 530 573 | IP Phone. 30573

andrew.myers@apph.com | http://www.apph.com<http://www.apph.com/>

vikasmahajan
Author

Thanks Andy You are Right There is some problem in excel , Solution given by

Abey Chandy  works for me thanks to all of you.

Vikas

Following Link Explain Details for Interval Match

http://www.citagus.com/citagus/blog/interval-match-feature-in-qlikview/

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.