Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I create a derived field in load script based on two sources???

Hello...

I can add derived fields in the script in each individual load source but...

I can't figure out how to add a derived field based on a field from each of the 2 sources...

This is the field I want to create:

IF(DATE_OF_ORDER >= INCEPTION_DATE, 'TRUE', 'FALSE') AS T1;

In this load script:

ODBC CONNECT TO Blah (XUserId is ZJTREVFLZGHXcMSLZKGXVT, XPassword is DKLBJOPbaKGZFHKE);


TRACKER:

LOAD

"DATE_OF_ORDER",
"POLICY_NO";
SQL SELECT * FROM TRACKER;

POLICY:

LOAD

"INCEPTION_DATE",
"POLICY_NO";
SQL SELECT * FROM POLICY;

Any advice most welcome... thanks, Mike

1 Solution

Accepted Solutions
deepakk
Partner
Partner

hi,

YOu can do it below way

PolicyInfo:

LOAD

"DATE_OF_ORDER",
"POLICY_NO";
SQL SELECT * FROM TRACKER;

JOin

LOAD

"INCEPTION_DATE",
"POLICY_NO";
SQL SELECT * FROM POLICY;

load

"POLICY_NO";
if(Date_Of_Order >= inception_Date ='true','False') as t1,

resident PolicyInfo

drop table PolicyInfo;

I hope this helps.

View solution in original post

2 Replies
deepakk
Partner
Partner

hi,

YOu can do it below way

PolicyInfo:

LOAD

"DATE_OF_ORDER",
"POLICY_NO";
SQL SELECT * FROM TRACKER;

JOin

LOAD

"INCEPTION_DATE",
"POLICY_NO";
SQL SELECT * FROM POLICY;

load

"POLICY_NO";
if(Date_Of_Order >= inception_Date ='true','False') as t1,

resident PolicyInfo

drop table PolicyInfo;

I hope this helps.

View solution in original post

Not applicable

Great thanks Deepak... works well... had to tweak a couple of commas and colons but works well... thanks... Mike