Subject Re: [firebird-support] Re: timestamp trigger?
Author Fernando Salaices
Ok, I thougth so. But this time I need to know the time and date the record
was added or modified only, it's not for sorting.

Thanks!

On 10/13/06, Adam <s3057043@...> wrote:
>
> --- In firebird-support@yahoogroups.com<firebird-support%40yahoogroups.com>,
> "Fernando Salaices"
> <fsalaices@...> wrote:
> >
> > a generator? Can a generator be created that returns the current date?
>
> No, a generator is a sequence in SQL terms. It will give you a number
> that has never been and never will be given to anyone else (*1)
>
> Ann was most likely assuming that you want to flag these records with
> a changed date so that you can query all records that have been
> changed since last time you ran the query.
>
> The problem with using timestamps for such a purpose is their
> precision (current_timestamp only returns to the second) and the fact
> they are not unique.
>
> Using generators to provide an update number allows this to be handled
> better.
>
> Adam
>
> (*1) providing no-one ever resets or decrements it.
>
>
>



--

Saludos,
Fernando Salaices.


[Non-text portions of this message have been removed]