On Mon, Jan 09, 2006 at 09:19:00AM -0600, Jay Sprenkle wrote:
> >   A guy on this end had a suggestion that I kicked myself for not
> > thinking of earlier: Use a simple numeric ID that you mod by the number
> > of records you want, automatically overwriting the oldest record when a
> > new one comes along..  I may have to put together a smallish trigger to
> > keep the IDs in range, perhaps a manual implementation of a simple
> > sequence to pull a value from, then use that as the record ID.
> 
> That works but what do you sort by to get the entries in order?

You can either just use a simple sequence and then delete where sequence
mod <number of records to keep> = 0 (hrm... does sqlite support
functional indexes?), or just add a timestamp to the table.
-- 
Jim C. Nasby, Sr. Engineering Consultant      [EMAIL PROTECTED]
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

Reply via email to