Subject | Exact timestamp w/o using UDF? |
---|---|
Author | Joe Martinez |
Post date | 2006-10-09T01:50:39Z |
Is there any way to get the exact timestamp within a trigger, other
than using a UDF?
I have a trigger that inserts the current timestamp into a
field. When I wrote the trigger, I used CURRENT_TIMESTAMP, and I
unfortunately assumed that it would include the fractions of
seconds. My application needs to be able to query records, sorted by
the order in which they were inserted, and whole seconds isn't
granular enough for that, and it is now causing problems in my
application. So, I now need to modify my trigger in some way so that
the timestamp value that it inserts will include the fractions of seconds.
I am trying to do some quick damage control now, and I'd like it to
be as simple as deleting and re-adding the trigger. I have a lot of
installations out there, and the databases are currently NOT attached
to FBUDF. I'd like to avoid having to set that up in all of the
installations out there, so I'm hoping for a non-UDF solution. This
is FB 1.0, and a Dialect 1 database, by the way.
Any ideas?
Thanks,
Joe
than using a UDF?
I have a trigger that inserts the current timestamp into a
field. When I wrote the trigger, I used CURRENT_TIMESTAMP, and I
unfortunately assumed that it would include the fractions of
seconds. My application needs to be able to query records, sorted by
the order in which they were inserted, and whole seconds isn't
granular enough for that, and it is now causing problems in my
application. So, I now need to modify my trigger in some way so that
the timestamp value that it inserts will include the fractions of seconds.
I am trying to do some quick damage control now, and I'd like it to
be as simple as deleting and re-adding the trigger. I have a lot of
installations out there, and the databases are currently NOT attached
to FBUDF. I'd like to avoid having to set that up in all of the
installations out there, so I'm hoping for a non-UDF solution. This
is FB 1.0, and a Dialect 1 database, by the way.
Any ideas?
Thanks,
Joe