Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

how to match date between period

I have QV doc where I want to load data from two tables

In my first I have data ewlating to Policy Details and in the 2nd data set claim details. First I want to load data from policy table and secondly o claim data if a policy exists from the first table and Loss date of claims table should fall between From_date and To_date in policy Table. I have wrtten the script but it does not work. Kindly help

ss:

LOAD * INLINE [

   

    Policy_no, Policy_Date, From_date, To_date,  Premium

    P1, 1-Jan-17, 1-Jan-17, 31-Dec-17, 25000

    P2, 2-Feb-17, 2-Feb-17, 1-Feb-18,  35000

    P3, 3-Mar-17, 3-Mar-17, 2-Mar-18,  10000

    P4, 4-Apr-17, 4-Apr-17, 3-Apr-18,  40000

    P5, 5-May-17, 5-May-17, 4-May-18,  12500

    P6, 6-Jun-17, 6-Jun-17, 5-Jun-18,  8000

    P7, 7-Jul-17, 7-Jul-17, 6-Jul-18,  11000

    P8, 8-Aug-17, 8-Aug-17, 7-Aug-18,  32000

    P9, 9-Sep-17, 9-Sep-17, 8-Sep-18,  21000

    P10, 10-Oct-17, 10-Oct-17, 9-Oct-18,  14000 ];

Concatenate(ss)

LOAD * INLINE [

  

    Policy_no, Claim_no, Loss_Date, claim

    P11, C1, 1-Dec-16, 10000

    P2, C2, 2-Feb-17, 4000

    P2, C3, 1-Jan-17, 2000

    P4, C4, 4-Mar-17, 3500

    P4, C5, 5-May-17, 5000

    P6, C6, 6-Jun-18, 4000

    P7, C7, 7-Jul-17, 1500

]

where exists(Policy_no)

AND Loss_Date>From_date AND Loss_Date<To_date ;

11 Replies
upaliwije
Creator II
Creator II
Author

Hi Friends

Pls help me to solve this issue

upaliwije
Creator II
Creator II
Author

I have Attached my QV doc so that you may help me easily

isingh30
Specialist
Specialist

Remove Concatenate & then try. Let me know.


Thanks.

upaliwije
Creator II
Creator II
Author

Dear Singh

Then all records from both table where policy No is matched is loaded without considering the period

isingh30
Specialist
Specialist

Can we do this in UI? Or you want to do this in the main script only..

Thanks.

upaliwije
Creator II
Creator II
Author

Yes main script only

upaliwije
Creator II
Creator II
Author

Can some one suggest an alternative way to accomplish my requirment please

shilpan
Partner Ambassador
Partner Ambassador

How about extended interval match?

shilpan
Partner Ambassador
Partner Ambassador

See my article on extended IntervalMatch

Qlikview Tutorial « Learn Qlikview