most recent records question

Fairlight fairlite at fairlite.com
Mon Jul 26 12:06:29 PDT 2004


Let's assume I have records somewhere.  Let us assume they have no actual
manually defined date/time fields.

A few questions about pulling the most recent records for the last 'x'
period:

1) Can you build an index on system-maintained fields like @cd or @ud (and
their associated time fields?

2) Will @ud be set to @cd if the record was created but never updated, or
would one have to do a separate search?

3) I'm assuming that if you -could- build an index across both @cd at ct, and
make it descending, you could set the comparison date and time to now and
check mathematically for your 'x' interval and stop when getnext exceeds
the bounds of your check criteria?  Or do those fields actually let you
sort chronologically at all?  If they do, what kind of field do you create
for a key comparison?

I know what I'm after, I'm not sure about the best way to go about it
-without- having to modify the tables that would already be extant.  I
feel it's either desirable, nor acceptable to have to modify every table
and manually try to fill in user-defined fields, for a drop-in module such
as I'm planning.  (Still planning, still not convinced I should do it, but
still marshalling thoughts and minutia.)

Suggestions are welcome.

mark->
-- 
Fairlight->   ||| "The road to truth is long, and    | Fairlight Consulting
  __/\__      ||| lined the entire way with annoying |
 <__<>__>     ||| bastards." --Alexander Jablokov    | http://www.fairlite.com
    \/        |||                                    | info at fairlite.com


More information about the Filepro-list mailing list