Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Friend ,
I need help Regarding Increamental Load.
Example : On 1st June Data in QVD
Maybe this can help you for some idea!!!!
The Script below shows you a simple incremental load. This will carry out the basic function of
inserting/adding new data. For more complex incremental loads such as UPDATE and DELETE. Please refer
to the reference manual.
//Find the maximum id or latest date etc to pass to the variable and subsequently the
where clause of the data load
MaxKeyLoad:
LOAD Max(PrimaryKey) as MaxID
FROM MyData.qvd (qvd);
//Peek into the MaxHeadLoad to get the latest value, in this case the MAX load above will
//only bring back 1v ow so the 0 in the variable tells it to bring the first row.
Let MaxID = peek('MaxID',0,MaxKeyLoad);
//Connect to your data source
CONNECT TO [Provider=OraOLEDB.Oracle.1;Persist Security Info=False;);
//Run the data load to pull data based on the variable to find the latest / newest row
MyData:
LOAD PrimaryKey,
Column1,
Column2,
Column3,
Column4;
SQL SELECT *
FROM DATABASE.MYDATA
Where PrimaryKey > $(MaxID);
//Append the new updated data to the existing historical qvd file
CONCATENATE
LOAD * FROM MyData.qvd (qvd);
//Store the new larger qvd file
Store MyData into MyData.qvd;
Hi sunil,
If i understood your question below is the answer.
1st create a variable in edit script.
Let VLastReloadTime = ReloadTime();
Table1:
Load Date,
"Sales Order",
Qty
From ...............;
Store Table1 into
After creating QVD comment the above code.
Next step will be taking data from DB directly when the Date field which is in table is greater than the last executed date which we have stored in variable (i.e VLastReloadTime) .
Table1:
Load Date,
"Sales Order",
Qty
From ............... where Date > $(VLastReloadTime);
Concatenate
Load Date,
"Sales Order",
Qty
From
again store the Table1 data in table1.qvd (i.e replace the old table1.qvd)
Hope this will help you.
-Peterson