If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > How to read Time stamps of rows

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-22-04, 02:27
pathri pathri is offline
Registered User
 
Join Date: Apr 2004
Location: zxczxczxc
Posts: 52
How to read Time stamps of rows

Hi,
I need to read rows which are inserted later than a particular row.
eg;

If i have the following rows
f
e
c
a
x

is it possible to read only the rows after c(i.e a,b).

One way i feel is to know the timestamps of rows. Is there any other method to do so.


Bye.
__________________
zxczxczc
Reply With Quote
  #2 (permalink)  
Old 12-22-04, 04:29
nitin_math nitin_math is offline
Registered User
 
Join Date: Nov 2004
Posts: 143
Hi,

You can use the column "rowid" example "select *,rowid from table_name"

bye
Reply With Quote
  #3 (permalink)  
Old 12-22-04, 05:03
supinformix supinformix is offline
Registered User
 
Join Date: Apr 2004
Location: Brussels
Posts: 57
I think you cannot use the rowid.
Under IDS7.31 I've tested it :
In my case the rowid of a deleted row was reused for a new created row.
create row a, b, c ; delete row b ; create row d, e,f
the result was that rowid of d = rowid of b < rowid c
__________________
Yves & Willy
Reply With Quote
  #4 (permalink)  
Old 12-27-04, 13:38
RobP RobP is offline
Registered User
 
Join Date: Mar 2004
Location: Netherlands
Posts: 183
Hi,

There is no possibilitie to solve this problem correctly. IDS has a 'timestamp' for all data but it is defined as following:
- on a page base (so multple records have same id)
- is not really a time but a seq. no
- seq. no is adjusted with every write achtion to the page
- possible write actions are: insert, update, deleta (but also backup if page
becomes rather old)

The best solution is to add a timestamp field to the record or maybe add crcols which are normally used for enterprise replication. The will hold two extra fields a user name and the timestamp. The fields can be accessed by using the specific column name, when select * they are not shown. See the ER guide for more info.

Greetz,

Rob Prop
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On