I assume by your description that this is kind of a log table, not master data, with dominant WRITE/INSERT assuming no business key and no ordering?
A "zero touch" solution? Run a daily EXPJRNE to a table or similar on the i then just "replay" the logs on sql server. If insert only should be fast to do. Or provide a TABLE function to the sqlserver that do that to ease interfacing to the journal.

On Tuesday, September 23, 2025 at 11:54:37 PM GMT+2, Jim Oberholtzer <midrangel@xxxxxxxxxxxxxxxxx> wrote:

The current process running has an SQL server using ODBC running a query against a IBM i table with 6 million rows (table scan, no selection criteria) and updating a SQL server table every night.

Right now, the process is a refresh of the 6 million rows on SQL server.  In reality we only need the newest rows since the last run.  Ordinarily I would just use a timestamp  on the table to pull rows since a specific time, but this table does not have a timestamp on it (JDE supplied table so I cannot modify it)

Is there a way we can use SQL to get only the newest rows on the table?  (Triggers are not available for the same reason I can’t modify the table)

My guess is no, without a timestamp we cannot, but hopefully someone will have an enlightened answer. 

Might temporal tables play in this scenario? 


--
Jim Oberholtzer
Agile Technology Architects





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.