PST_ARCHIVE_ID Pseudocolumn

The PST_ARCHIVE_ID pseudocolumn is logically added to each archived table during ODM Optim Connect processing and contains the Archive File ID of the Archive File that includes the table. Use PST_ARCHIVE_ID to specify the Archive File from which a row is selected.

For example, you can use PST_ARCHIVE_ID to control a join by avoiding duplicate rows from a table in multiple files in the Archive File Collection. If the DETAILS table is related to the ITEMS table, and only the DETAILS table is unique across all files in the collection, then a join between the tables would result in duplicate ITEMS rows joined with DETAILS rows. To avoid duplicate rows, use the following syntax:

SELECT * FROM PST.DETAILS, PST.ITEMS
WHERE 
PST.DETAILS.ITEM_ID=PST.ITEMS.ITEM_ID 
AND
PST.DETAILS.PST_ARCHIVE_ID=PST.ITEMS.PST_ARCHIVE_ID


Feedback