Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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
Valued Contributor III

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

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.

2 Replies
deepakk
Valued Contributor III

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

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

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

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

Community Browser