Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
william_denholm
Contributor III
Contributor III

No Modified Time on DB Table

Hello,

We have a table where we are looking to implement an incremental load in to QV.

Problem I have is that the table does not contain any modified time etc. However, there is a table with some of the same data that does have a modified time. When this table is updated, the other table is also updated.

Example:

Table 1 - Order

Order Number, modified time, destination, etc

Table 2 - Order Details

Order Number, Line no, Part No.

Order Number is the same on both but there are multiple entries for each order (as each order has more than one line)

How can I query Table 2 to perform an incremental load?

1 Solution

Accepted Solutions
marcus_malinow
Partner - Specialist III
Partner - Specialist III

The easiest way would be to join Table 1 and Table 2 in your initial SQL query

e.g.

select

    Table 1.Order Number,

    Table 1.modified time,

    Table 2.Line no,

    Table 2.Part No

FROM Table 1

INNER JOIN Table 2 on Table 2.Order Number = Table 1.Order Number

WHERE Table 1.modified time > '[Modified Time Variable]'

View solution in original post

3 Replies
Anonymous
Not applicable

Hi William,

    Instead of looking for Modified Date Time field, go with Primary Key in both tables

For Ex:Get the PK  at WHERE and use the exists function to match your record's availability.

-Jay

marcus_malinow
Partner - Specialist III
Partner - Specialist III

The easiest way would be to join Table 1 and Table 2 in your initial SQL query

e.g.

select

    Table 1.Order Number,

    Table 1.modified time,

    Table 2.Line no,

    Table 2.Part No

FROM Table 1

INNER JOIN Table 2 on Table 2.Order Number = Table 1.Order Number

WHERE Table 1.modified time > '[Modified Time Variable]'

william_denholm
Contributor III
Contributor III
Author

Thank you, this worked perfectly!