Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
New Contributor II

Date field is null

Hi All,

Please anyone send me the below logic

1.Order Status Line – This is a unique combination of CUST_ID, CUST_ORD_NO, ORD_PART_NO
a.Update records for every unique combination of above daily only if ORD_LN_COMP_DT is not available (blank)
b.If ORD_LN_COMP_DT is available, that means transaction is completed and no need to update the data

Labels (1)
1 Reply
Highlighted
New Contributor

Re: Date field is null

Try if it's work....!!

 


//Full Load from DB One Time Start

FullLoadFromDatabase:
LOAD
CUST_ID&'-'&CUST_ORD_NO&'-'&ORD_PART_NO AS Unique_ID,
CUST_ID,
CUST_ORD_NO,
ORD_PART_NO,
ORD_LN_COMP_DT
From DatabaseTable.qvd(QVD) where not IsNull(ORD_LN_COMP_DT);

STORE FullLoadFromDatabase INTO FullLoadFromDatabase.QVD;

//Full Load from DB One Time End


//Incremental Load Start

InsertUpdate:
LOAD
CUST_ID&'-'&CUST_ORD_NO&'-'&ORD_PART_NO AS Unique_ID,
CUST_ID,
CUST_ORD_NO,
ORD_PART_NO,
ORD_LN_COMP_DT
From FullLoadFromDatabase.qvd(QVD) where not IsNull(ORD_LN_COMP_DT);
//Concatenate for insert new record with date
Concatenate
LOAD
CUST_ID&'-'&CUST_ORD_NO&'-'&ORD_PART_NO AS Unique_ID,
CUST_ID,
CUST_ORD_NO,
ORD_PART_NO,
ORD_LN_COMP_DT
From DatabAseTableName.qvd(QVD) where not IsNull(ORD_LN_COMP_DT) and not Exists(Unique_ID);
//Concatenate for Update this should always goto database for null date record
Concatenate
LOAD
CUST_ID&'-'&CUST_ORD_NO&'-'&ORD_PART_NO AS Unique_ID,
CUST_ID,
CUST_ORD_NO,
ORD_PART_NO,
ORD_LN_COMP_DT
From DatabAseTableName.qvd(QVD) where IsNull(ORD_LN_COMP_DT);

STORE InsertUpdate INTO FullLoadFromDatabase.QVD;