Just a little more detail on that.
You can add a time stamp column on a DDS table also. However, with a
table defined by SQL you can set it up like this:
create table rob/scratch (
Added_By char (18) default USER not null implicitly hidden,
Last_changed_timestamp timestamp for each row on update
as row change timestamp
not null
implicitly hidden,
mytext char (5))

INSERT INTO ROB/SCRATCH (MYTEXT) VALUES('abc');

select * from rob/scratch
....+.
MYTEXT
abc

select Added_by, Last_changed_timestamp, mytext
from rob/scratch

....+....1....+....2....+....3....+....4....+....5....
ADDED_BY LAST_CHANGED_TIMESTA MYTEXT
MP
ROB 2012-07-20-09.35.08.453436 abc
******** End of data ********

Little weird that a column with a default of USER must be defined with at
least 18 characters.

There's nothing to stop you from fudging the 'added_by'
update rob/scratch
set added_by='Agent X'

....+....1....+....2....+....3....+....4....+....5....
ADDED_BY LAST_CHANGED_TIMESTA MYTEXT
MP
Agent X 2012-07-20-09.39.07.836514 abc
******** End of data ********

Did you notice that it updated the last changed timestamp also though?

One could do this with older versions of the OS with a trigger program.






Rob Berendt

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-2024 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.