Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Matthew Herbert asked whether Informix has a TIMESTAMP constant for detecting changed records. Art Kagel said there is no built-in per-row timestamp, but one can add a DATETIME YEAR TO FRACTION(3) DEFAULT CURRENT column, with an update trigger to maintain it on updates. Rudy Fernandes noted that CURRENT can be set in an UPDATE statement.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Matthew Herbert — — source: Informix-list mailing list archive (1991-1998)
Hi
Does anyone know whether Informix supports the symbolic constant TIMESTAMP
for individual records. I am trying to determine whether a particular
record has been changed.
Thanks in advance
Matthew
mat@softhouse.co.uk
↪ replying to Matthew Herbert
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
Informix has no generic built-in TIMESTAMP column attached to every row as
some databases do. You CAN however, alter the table to contain a column,
name it timestamp if you like, of type:
timestamp DATETIME YEAR TO FRACTION(3) DEFAULT CURRENT
and it will serve for inserts. To maintain for updates just add an update
trigger:
CREATE TRIGGER mytable_TS ON mytable FOR UPDATE .......
Art S. Kagel
Matthew Herbert wrote:
>
> Hi
>
> Does anyone know whether Informix supports the symbolic constant TIMESTAMP
> for individual records. I am trying to determine whether a particular
> record has been changed.
>
> Thanks in advance
>
> Matthew
> mat@softhouse.co.uk
↪ replying to Matthew Herbert
Rudy Fernandes — — source: Informix-list mailing list archive (1991-1998)
The keyword CURRENT returns the current time. For example,
UPDATE table SET
cola = value,
colb = value,
colz = CURRENT
WHERE ...
will set colz of all rows that match the WHERE clause to the current
time.
Is this what you are looking for?
Rudy
On Wed, 1 Sep 1999 11:33:48 +0100, "Matthew Herbert"
<Mat@softhouse.co.uk> wrote:
>Hi
>
>Does anyone know whether Informix supports the symbolic constant TIMESTAMP
>for individual records. I am trying to determine whether a particular
>record has been changed.
>
>Thanks in advance
>
>
>Matthew
>mat@softhouse.co.uk
>
>
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.