Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how can i load new inserting data in data base .
i did use where condition but it will come total data so i dont want total data i want only newly inserting data pls kindly solve this problem
i did attach file what did am i done
Please check the incremental load sample in the QV cookbook ( available here:http://robwunderlich.com/downloads/ ). It should explain quite nicely how to handle new / updated / deleted records.
Thanks!
a simple approach can be followed like below.
//create an old date as base date
let vDate = Date(0,'MM/DD/YYYY');
if(QvdCreateTime('customer.qvd')>0) then
loadorderdate:
load max(OrderDate) as mxdt from customer.qvd(qvd);
let vDate = Date(peek('mxdt',0,'loadorderdate'),'MM/DD/YYYY'); // update the vDate with max OrderDate
drop table loadorderdate;
endif
Customer:
load *, OrderDate from Customer where OrderDate > '$(vDate)'; // Only new orders will be loaded from the source
//rest of the data to be loaded from QVD
if(QvdCreateTime('customer.qvd')>0) then
concatenate load * from customer.qvd(qvd);
// where not Exist(CustomerID) // use this where clause if you want to update the records
end if
store Customer into Customer.qvd(qvd);