Re: how to find the 2 months old rec
Posted in 2006
Topics: General Discussion
Keith Simmons wrote: > IDS is a relational database and therefore has no implicit > ordering, ie later records are not stored 'after' earlier ones. > The answer therfore is no, unless you maintain your own > date/time fields you cannot retrieve records for specific > date periods > > Keith > > On 19 Sep 2006 01:43:42 -0700, calyanram@hotmail.com > <calyanram@hotmail.com> wrote: > > Hi > > > > I just want to find out the 2 months old record in a table. > > > > but there is no timestamp in table? > > > > how to find out ? is there any systables available for this? > > > > thanks in advance > > > > _______________________________________________ > > Informix-list mailing list > > Informix-list@iiug.org > > http://www.iiug.org/mailman/listinfo/informix-list > > It may not be very reliable , however you might be able to an idea of rows you want if you use the Rowid if you can figure out what rowid is for the date range you want
Jim m wrote: > Keith Simmons wrote: >> IDS is a relational database and therefore has no implicit >> ordering, ie later records are not stored 'after' earlier ones. >> The answer therfore is no, unless you maintain your own >> date/time fields you cannot retrieve records for specific >> date periods >> >> Keith >> >> On 19 Sep 2006 01:43:42 -0700, calyanram@hotmail.com >> <calyanram@hotmail.com> wrote: >>> Hi >>> >>> I just want to find out the 2 months old record in a table. >>> >>> but there is no timestamp in table? >>> >>> how to find out ? is there any systables available for this? > It may not be very reliable , however you might be able to an idea of > rows you want if you use the Rowid if you can figure out what rowid is > for the date range you want Very unreliable; once you've deleted some rows, those rowids will be reused for future inserts. The rowids only increase monotonically if you never do any deleting. Keith was pretty much on target; if you need to delete by date when the record was inserted (or updated), you need to record that time explicitly. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/