how to detect if data in a table was changed...??? 
Author Message
 how to detect if data in a table was changed...???
Hi,
I'm probably going to risk some people getting wild at me but I believe
that's the fastest way for me to get an answer to my question.

I would like to know which SQL-statement to use to get an information
if a table was changed in between. Actually I should read data from a
table a couple of times but in my eyes it would be better only to read
the data again if there was a change.

Thanks,
Axel

Sent via Deja.com http://www.***.com/
Before you buy.



Fri, 02 May 2003 03:00:00 GMT
 how to detect if data in a table was changed...???

You would need to write a trigger to update a timestamp column after every
insert, update or delete on the table.
Quote:

> Hi,
> I'm probably going to risk some people getting wild at me but I believe
> that's the fastest way for me to get an answer to my question.

> I would like to know which SQL-statement to use to get an information
> if a table was changed in between. Actually I should read data from a
> table a couple of times but in my eyes it would be better only to read
> the data again if there was a change.

> Thanks,
> Axel

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Fri, 02 May 2003 03:00:00 GMT
 how to detect if data in a table was changed...???
Axel, here's some thoughts in DB2 for OS390 terms. Can't think of any
place to check (I thought about auditing the table but this would be a
very complicated affair). Use ISOLATION(RR) on PLAN or PACKAGE. Add a
timestamp that must be updated by all uses (ya right, like we can
gaurantee this) add check to see if it changed . . . Rick


Quote:

> Hi,
> I'm probably going to risk some people getting wild at me but I
believe
> that's the fastest way for me to get an answer to my question.

> I would like to know which SQL-statement to use to get an information
> if a table was changed in between. Actually I should read data from a
> table a couple of times but in my eyes it would be better only to read
> the data again if there was a change.

> Thanks,
> Axel

> Sent via Deja.com http://www.deja.com/
> Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.


Sun, 04 May 2003 03:00:00 GMT
 how to detect if data in a table was changed...???
Hi Axel,

I do this using an additional Integer column and a before update trigger.
Every time one row gets updated I count one to the integer.

So I remember the Original Integer an do this:

UPDATE XXXX.YYYY SET YYYY=ZZZZ WHERE xxxx AND INTEGER=ORGINAL

If the row got updated the UPDATE will fail and I know why...

Cheers,
Frank.

Quote:

>Hi,
>I'm probably going to risk some people getting wild at me but I believe
>that's the fastest way for me to get an answer to my question.

>I would like to know which SQL-statement to use to get an information
>if a table was changed in between. Actually I should read data from a
>table a couple of times but in my eyes it would be better only to read
>the data again if there was a change.

>Thanks,
>Axel

>Sent via Deja.com http://www.deja.com/
>Before you buy.



Mon, 05 May 2003 14:55:43 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. How can I detect data changes without using triggers

2. handling data changes _ am getting stressed thinking about it

3. Detect data changes - what is a reliable method?

4. Detecting that your data has changed?

5. Detecting data changes using dynamic cursors.

6. Detect Data Change At Form Level

7. detect changes in ms sql table without trigers

8. Detecting table changes

9. How to detect changes in a table.

10. Detecting changes in a table

11. vc function for detecting database table changes

12. How do I detect changes to a table?


 
Powered by phpBB® Forum Software