Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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;