Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Incremental Extract on an database based on Id

Hello,

i met an problem i would like to implement an incremental extract based on id i loaded before in the Extract script…

In fact, I’ve two table an Order Line and Order Header which are rely on an ID_Order_header.

For the Order Header, there is no problem cause I ve an field  Date_Order so I can extract only the data of the day or the month anywhere…. But for the line, I don’t have a Date_Order to implement an incremental so I would like to extract the data of my line Order only for the ID_Order_header I ve extracted before..

I don’t know how to do in the SQL part ?

Is Someboby have an idea…

Thanks


3 Replies
Gysbert_Wassenaar

Use the Date_Order from the Order Header table:

SQL SELECT OL.*

FROM OrderHeader OH join OrderLine OL on OH.ID_Order_Header = OL.ID_Order_Header

WHERE OH.Date_Order > ...somevalue...

;


talk is cheap, supply exceeds demand
Not applicable
Author

hello thanks for the response,

but is there any other methods to use the ID_Order_Header without using an join between the two tables ....

It takes an lot of time ... and i ve an already extracted and loaded in my script and in memory the ID_Order_Hearder....

Thanks

Gysbert_Wassenaar

The join in the SQL statement is executed on the database server and will use almost certainly use an index. So that join should not be very costly. If it is you need to put your database administrator to work.

But yes, you can do it differently by loading all the records from the OrderLine table into Qlikview and then remove the ones you don't need with a left keep.

Orders:

SQL Select * From OrderHeader Where Date_Order > ...somevalue...;

Left Keep

OrderLines:

SQL Select * From OrderLines;


talk is cheap, supply exceeds demand