Informix

 View Only
  • 1.  Inner Join

    Posted Thu December 01, 2022 12:37 PM
    I need to do an inner join where I need to bring only the records that were updated with the date >= today,

    The tables do not contain a column that informs a record update date to use as a reference, how can I solve this?

    ------------------------------
    Fabricio Moura
    ------------------------------

    #Informix


  • 2.  RE: Inner Join

    IBM Champion
    Posted Thu December 01, 2022 12:43 PM
    Fabricio:

    If there is not a column in the table that indicates when it was updated, nor in the table(s) to which it is joined, then there really is no way to know when the row was last updated. If you have a need to process recently updated rows, then you will have to alter the table to contain an "updated_date" column and populated it via a trigger for updates and with a "DEFAULT TODAY" constraint for inserts.

    It is possible, though not simple, to scan through the logical logs to determine when a row was updated, but again, that is not for the faint of heart. If this is a critical business need, reach out to me privately to discuss how we can help.

    Art

    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------