row modifiction time
Posted in 2004
The poster asked whether IDS 9.4 records a per-row last-modified timestamp (e.g. in sysmaster) so rows could be filtered by modification time. Replies said there is no such timestamp by default: you must add your own column and maintain it in application code or, better, via a trigger. One contributor pointed out that Enterprise Replication provides hidden shadow columns — CREATE TABLE ... WITH CRCOLS gives a cdrtime column that can be selected explicitly. A follow-up question about whether HDR/data replication offers the same went unanswered; the original poster simply thanked the list.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: General Discussion
I have a important requirement for ids. I can select a table,and filter is rows modifiction time. I want to know if the ids9.4 have this function. Is there some colmns represnting the modified time in the sysmaster tables?
Chen Unfortunately IDS, by default, does not maintain any form of timestamp at the row level. If you need to do this you will need to create a new column and update it each time the record in amended, either within the code or, perhaps more appropriately, by using a trigger. Keith -> -----Original Message----- -> From: CHEN BIN [mailto:chenbincau@163.com] -> Sent: Thursday, July 22, 2004 7:12 AM -> To: ids@iiug.org -> Subject: row modifiction time [3276] -> -> -> I have a important requirement for ids. I can select a -> table,and filter is rows -> modifiction time. I want to know if the ids9.4 have this -> function. Is there some -> colmns represnting the modified time in the sysmaster tables? -> ******************************************************************************** ** This message is sent in strict confidence for the addressee only. It may contain legally privileged information. The contents are not to be disclosed to anyone other than the addressee. Unauthorised recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission. This footnote also confirms that this email message has been swept for the presence of computer viruses, however we cannot guarantee that this message is free from such problems. ******************************************************************************** **
Hi, I don't think that this is built-in. And certainly not for individual data rows as this would be a huge amount of data and blow up e.g. sysmaster database significantly. However, I think you can implement this using "TRIGGER"s. With these you can specify certain actions upon certain events. DML (Data Manipulation Language) statements can be such events. In the TRIGGER you would then define that a current date is kept somewhere. These dates can then later be queried as they will be in a normal table ... Please see the "Guide to SQL" manuals ("Tutorial", "Reference", Syntax") for more information on TRIGGERs. (Unfortunately I'm not an expert on TRIGGERs.) Regards, Martin -- Martin Fuerderer IBM Informix Development Munich Data Management Solutions forum.subscriber@iiug.org wrote on 22.07.2004 08:12:25: > I have a important requirement for ids. I can select a table,and filter is rows > modifiction time. I want to know if the ids9.4 have this function. Is there some > colmns represnting the modified time in the sysmaster tables? >
Actually it does (as a part of enterprise
replication)
create table xyz (f1 integer
) with CRCOLS;
insert into xyz values (1);
insert into xyz values (2);
select * from xyz;
f1
1
2
select cdrtime,* from xyz;
cdrtime f1
1090489619 1
1090489626 2
-- Paul
-----Original Message-----
From: forum.subscriber@iiug.org [mailto:forum.subscriber@iiug.org]On
Behalf Of Simmons, Keith
Sent: 22 July 2004 09:53
To: ids@iiug.org
Subject: RE: row modifiction time [3277]
Chen
Unfortunately IDS, by default, does not maintain any form of timestamp at
the row level. If you need to do this you will need to create a new column
and update it each time the record in amended, either within the code or,
perhaps more appropriately, by using a trigger.
Keith
-> -----Original Message-----
-> From: CHEN BIN [mailto:chenbincau@163.com]
-> Sent: Thursday, July 22, 2004 7:12 AM
-> To: ids@iiug.org
-> Subject: row modifiction time [3276]
->
->
-> I have a important requirement for ids. I can select a
-> table,and filter is rows
-> modifiction time. I want to know if the ids9.4 have this
-> function. Is there some
-> colmns represnting the modified time in the sysmaster tables?
->
****************************************************************************
******
This message is sent in strict confidence for the addressee only. It may
contain legally privileged information. The contents are not to be disclosed
to anyone other than the addressee. Unauthorised recipients are requested
to preserve this confidentiality and to advise the sender immediately of any
error in transmission.
This footnote also confirms that this email message has been swept for the
presence of computer viruses, however we cannot guarantee that this message
is free from such problems.
****************************************************************************
******
--0__=09BBE44ADFC30DEB8f9e8a93df938690918c09BBE44ADFC30DEB Content-type: multipart/alternative; Boundary="1__=09BBE44ADFC30DEB8f9e8a93df938690918c09BBE44ADFC30DEB" --1__=09BBE44ADFC30DEB8f9e8a93df938690918c09BBE44ADFC30DEB Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: quoted-printable Martin What about adding CRCOLS? = "Martin Fuer...." = <MARTINFU@de.ibm. = com> = To Sent by: ids@iiug.org = forum.subscriber@ = cc iiug.org = Subj= ect Re: row modifiction time [3278= ] 07/22/2004 03:42 = AM = = = = = Hi, I don't think that this is built-in. And certainly not for individual data rows as this would be a huge amount of data and blow up e.g. sysmaster database significantly. However, I think you can implement this using "TRIGGER"s. With these you can specify certain actions upon certain events. DML (Data Manipulation Language) statements can be such events. In the TRIGGER you would then define that a current date is kept somewhere. These dates can then later be queried as they will be in a normal table ... Please see the "Guide to SQL" manuals ("Tutorial", "Reference", Syntax") for more information on TRIGGERs. (Unfortunately I'm not an expert on TRIGGERs.) Regards, Martin -- Martin Fuerderer IBM Informix Development Munich Data Management Solutions forum.subscriber@iiug.org wrote on 22.07.2004 08:12:25: > I have a important requirement for ids. I can select a table,and filt= er is rows > modifiction time. I want to know if the ids9.4 have this function. Is= there some > colmns represnting the modified time in the sysmaster tables? > = --1__=09BBE44ADFC30DEB8f9e8a93df938690918c09BBE44ADFC30DEB Content-type: text/html; charset=US-ASCII Content-Disposition: inline Content-transfer-encoding: quoted-printable <html><body> <p>Martin<br> <br> What about adding CRCOLS?<br> <br> <br> <img src=3D"cid:10__=3D09BBE44ADFC30DEB8f9e8a93df938@us.ibm.com" width=3D= "16" height=3D"16" alt=3D"Inactive hide details for "Martin Fuer..= .." <MARTINFU@de.ibm.com>">"Martin Fuer...." <M= ARTINFU@de.ibm.com><br> <br> <br> <table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">= <tr valign=3D"top"><td style=3D"background-image:url(cid:20__=3D09BBE44= ADFC30DEB8f9e8a93df938@us.ibm.com); background-repeat: no-repeat; " wid= th=3D"40%"> <ul> <ul> <ul> <ul><b><font size=3D"2">"Martin Fuer...." <MARTINFU@de.ibm= .com></font></b><font size=3D"2"> </font><br> <font size=3D"2">Sent by: forum.subscriber@iiug.org</font> <p><font size=3D"2">07/22/2004 03:42 AM</font></ul> </ul> </ul> </ul> </td><td width=3D"60%"> <table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">= <tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:3= 0__=3D09BBE44ADFC30DEB8f9e8a93df938@us.ibm.com" border=3D"0" height=3D"= 1" width=3D"58" alt=3D""><br> <div align=3D"right"><font size=3D"2">To</font></div></td><td width=3D"= 100%"><img src=3D"cid:30__=3D09BBE44ADFC30DEB8f9e8a93df938@us.ibm.com" = border=3D"0" height=3D"1" width=3D"1" alt=3D""><br> <font size=3D"2">ids@iiug.org</font></td></tr> <tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:3= 0__=3D09BBE44ADFC30DEB8f9e8a93df938@us.ibm.com" border=3D"0" height=3D"= 1" width=3D"58" alt=3D""><br> <div align=3D"right"><font size=3D"2">cc</font></div></td><td width=3D"= 100%"><img src=3D"cid:30__=3D09BBE44ADFC30DEB8f9e8a93df938@us.ibm.com" = border=3D"0" height=3D"1" width=3D"1" alt=3D""><br> </td></tr> <tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:3= 0__=3D09BBE44ADFC30DEB8f9e8a93df938@us.ibm.com" border=3D"0" height=3D"= 1" width=3D"58" alt=3D""><br> <div align=3D"right"><font size=3D"2">Subject</font></div></td><td widt= h=3D"100%"><img src=3D"cid:30__=3D09BBE44ADFC30DEB8f9e8a93df938@us.ibm.= com" border=3D"0" height=3D"1" width=3D"1" alt=3D""><br> <font size=3D"2">Re: row modifiction time [3278]</font></td></tr> </table> <table border=3D"0" cellspacing=3D"0" cellpadding=3D"0"> <tr valign=3D"top"><td width=3D"58"><img src=3D"cid:30__=3D09BBE44ADFC3= 0DEB8f9e8a93df938@us.ibm.com" border=3D"0" height=3D"1" width=3D"1" alt= =3D""></td><td width=3D"336"><img src=3D"cid:30__=3D09BBE44ADFC30DEB8f9= e8a93df938@us.ibm.com" border=3D"0" height=3D"1" width=3D"1" alt=3D""><= /td></tr> </table> </td></tr> </table> <br> <tt>Hi,<br> <br> I don't think that this is built-in. And certainly not for<br> individual data rows as this would be a huge amount<br> of data and blow up e.g. sysmaster database significantly.<br> <br> However, I think you can implement this using<br> "TRIGGER"s. With these you can specify certain actions<br> upon certain events. DML (Data Manipulation Language)<br> statements can be such events. In the TRIGGER you<br> would then define that a current date is kept somewhere.<br> These dates can then later be queried as they will be in<br> a normal table ...<br> <br> Please see the "Guide to SQL" manuals ("Tutorial",<= br> "Reference", Syntax") for more information on TRIGGERs.<= br> (Unfortunately I'm not an expert on TRIGGERs.)<br> <br> Regards,<br> Martin<br> --<br> Martin Fuerderer<br> IBM Informix Development Munich<br> Data Management Solutions<br> <br> forum.subscriber@iiug.org wrote on 22.07.2004 08:12:25:<br> <br> > I have a important requirement for ids. I can select a table,and f= ilter <br> is rows<br> > modifiction time. I want to know if the ids9.4 have this function.= Is <br> there some<br> > colmns represnting the modified time in the sysmaster tables?<br> > <br> <br> <br> </tt><br> </body></html>= --1__=09BBE44ADFC30DEB8f9e8a93df938690918c09BBE44ADFC30DEB-- --0__=09BBE44ADFC30DEB8f9e8a93df938690918c09BBE44ADFC30DEB Content-type: image/gif; name="graycol.gif" Content-Disposition: inline; filename="graycol.gif" Content-ID: <10__=09BBE44ADFC30DEB8f9e8a93df938@us.ibm.com> Content-transfer-enco
If i have database with DR (data replication) enable,
can i trace the timestamp for the row being inserted?
--- Paul S Card <pscard@upd.co.za> wrote:
> Actually it does (as a part of enterprise
> replication)
>
> create table xyz (> f1 integer
> ) with CRCOLS;
>
> insert into xyz values (1);
> insert into xyz values (2);>
> select * from xyz;>
> f1
>
> 1
> 2
>
> select cdrtime,* from xyz;>
> cdrtime f1
>
> 1090489619 1
> 1090489626 2
>
>
> -- Paul
>
> -----Original Message-----
> From: forum.subscriber@iiug.org
> [mailto:forum.subscriber@iiug.org]On
> Behalf Of Simmons, Keith
> Sent: 22 July 2004 09:53
> To: ids@iiug.org
> Subject: RE: row modifiction time [3277]
>
>
> Chen
>
> Unfortunately IDS, by default, does not maintain any
> form of timestamp at
> the row level. If you need to do this you will need
> to create a new column
> and update it each time the record in amended,
> either within the code or,
> perhaps more appropriately, by using a trigger.
>
> Keith
>
> -> -----Original Message-----
> -> From: CHEN BIN [mailto:chenbincau@163.com]
> -> Sent: Thursday, July 22, 2004 7:12 AM
> -> To: ids@iiug.org
> -> Subject: row modifiction time [3276]
> ->
> ->
> -> I have a important requirement for ids. I can
> select a> -> table,and filter is rows
> -> modifiction time. I want to know if the ids9.4
> have this
> -> function. Is there some
> -> colmns represnting the modified time in the
> sysmaster tables?
> ->
>
>
>
****************************************************************************
> ******
> This message is sent in strict confidence for the
> addressee only. It may
> contain legally privileged information. The contents
> are not to be disclosed
> to anyone other than the addressee. Unauthorised
> recipients are requested
> to preserve this confidentiality and to advise the
> sender immediately of any
> error in transmission.
> This footnote also confirms that this email message
> has been swept for the
> presence of computer viruses, however we cannot
> guarantee that this message
> is free from such problems.
>
****************************************************************************
> ******
>
>
>
>
>
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
thanks for your help! I try my best researching the IDS.