Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Capturing table name when parsing sql statement.

Re: Capturing table name when parsing sql statement.

From: Randy DeWoolfson <randy_at_euclidsys.com>
Date: Thu, 21 Oct 1999 17:12:16 -0400
Message-ID: <380F81B0.FBF5270@euclidsys.com>


copying tables is almost certainly not the thing you want to do for each update.

This sort of thing is done with a trigger. Create an update trigger that copies the old data to a holding table before the commit.

or just dont commit...

are you worried about data integrity? are you debugging SQL in the live database?

use a test database with triggers as above to solve your problem.. i think.

Hth,
Randy

screwbai_at_my-deja.com wrote:
>
> Lets say that I have an sql that look like this:
>
> insert into test1 select * from test;
> update test2 set col1 = 1;
>
> I want to capture the name of the tables that are going to be modified
> (update, insert or delete) without executing the sql statement. So that
> I can make a copy of these tables before I execute the modifcations.
>
> 1. Is there a way to capture the names of these tables when the sql is
> parsed.
>
> 2. Can I parse the sql without executing it.
>
> Thanks !!
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Oct 21 1999 - 16:12:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US