Where oncheck -pt information is stored
Posted in 2019
Topics: General Discussion
Hi,
I'm trying to find out the date a fragment of a table was created, it's easy
to see with oncheck -pt, but i want to query any table to get the same
results. Does anyone know where i can find it?
Original post:
Hi,
I'm trying to find out the date a fragment of a table was created, it's easy
to see with oncheck -pt, but i want to query any table to get the same
results. Does anyone know where i can find it?
Response:
In oncheck -pt the field is "Creation date" and that field can be seen in the
table sysmaster:sysptnhdr. The column is "created". However, if you query that
column or check the schema, it's being reported as an integer, while oncheck
-pt is reporting it in the form of unix time format (so it's an integer that
represents the number of seconds the Epoch, 1970-01-01 00:00:00 utc). So
depending on your release (I don't recall when dbinfo was added off the top of
my head), you could do the following to get that integer converted to the
format that oncheck -pt is reporting:
select (dbinfo("UTC_TO_DATETIME", created), partnum from sysptnhdr
(and then add whatever other filters you require or joins to systabnames, etc)
Jacques Renaut
HCL Informix Advanced Support