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: 
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 - Specialist III
Partner - Specialist III

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 - Specialist III
Partner - Specialist III

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.

Not applicable
Author

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