Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load data based on Date

Hi

Iam very new Qlikview, Iam loading the data from 2 XLSX files.

1st file is having the data EmpID, Date, Addr etc,

2nd file : EmpId, Date From , Date To, AccessTime etc.

my requirement is to load the Emp data  based on date.

Ex: Select * from Table1 inner join table2 on T1.Empid = T2.Empid and T1.Date  between T2.Date From and T2.Date To.

How can i write the script for this condition.

regards

sudhakar

1 Solution

Accepted Solutions
aarkay29
Specialist
Specialist

May be This:

TABLE1:

LOAD

     EmpID,

     Date,

     Addr

FROM

     TABLE1;


NNER JOIN

INTERVAL MATCH(Date,EmpID)

LOAD

     Date From ,

     Date To,

     EmpID

FROM

     TABLE2;

View solution in original post

5 Replies
german24
Partner - Contributor III
Partner - Contributor III

Hi,

try this...

T1:

LOAD  EmpID AS Empid,

  *

FROM

[Table1.xlsx]

(biff, embedded labels, table is [Sheet$]);

//T2:

Inner Join(T1)

LOAD Empid,

   *

FROM

[Table2.xlsx]

(biff, embedded labels, table is [Sheet$])

Where Date >= 'DD/MM/YYYY' and Date <= 'DD/MM/YYYY';

Just the field EmpID must be equal en the two tables.

Best regards,

German

aarkay29
Specialist
Specialist

May be This:

TABLE1:

LOAD

     EmpID,

     Date,

     Addr

FROM

     TABLE1;


NNER JOIN

INTERVAL MATCH(Date,EmpID)

LOAD

     Date From ,

     Date To,

     EmpID

FROM

     TABLE2;

Not applicable
Author

Thank you all,

@Aar Kay : 'Interval Match' function solved the issue.

regards

sudhakar.

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post) and Helpful Answers (found under the Actions menu under every post).

If not, please make clear what part of this topic you still need help with .

May you live in interesting times!
oknotsen
Master III
Master III

It is nice that you have voted me as "Helpful" , but the idea of my post was to see if your question is answered (by you marking the "Correct Answer", so the topic will be flagged answered) or having you post what part you still need help with.

May you live in interesting times!