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: problem

Re: problem

From: Alex Filonov <afilonov_at_pro-ns.net>
Date: Wed, 06 Dec 2000 03:40:16 GMT
Message-ID: <90kcf0$bsn$1@nnrp1.deja.com>

Create an after insert for each row trigger on table A.

In article <3A2D35F6.9BAFA592_at_mitre.org>,   ali Obaidi <ali_at_mitre.org> wrote:
> This is a multi-part message in MIME format.
> --------------B424B6D0B8D0BD009979CC91
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> I have two tables A and B. Table B has fields that been derived from
> Table A using a sql procedure.
>
> the procedure worked when it construct the derived fields in table B
 in
> the first time.
>
> now I added data into table A that need to be derived into table B.
 the
> question
>
> I need to derived only rows that has been added to table A.
>
> for example
>
> table A has the following fields
>
> id number
> x char
> y char
> z char
>
> table B has the following fields
>
> id number
> der_type
> x_der date
> y_der date
> Z_der date
>
> my sql programme is something like
>
> cursor original select id,x,y,z from table A
> begin
> loop
> fetch original into v_id, v_x, v_y, v_z
> ...
> exit when not found
> ....
> ....
> insert into B the values v_id,v_x,v_y, v_z, der_type
>
> note der_type could be 1,2 or 3 depend on the some criteria. hence
 there
> will be 3 records in table B for each id in Table A.
>
> any suggestion?
>
> ali
> --------------B424B6D0B8D0BD009979CC91
> Content-Type: text/x-vcard; charset=us-ascii;
> name="ali.vcf"
> Content-Transfer-Encoding: 7bit
> Content-Description: Card for ali Obaidi
> Content-Disposition: attachment;
> filename="ali.vcf"
>
> begin:vcard
> n:Obaidi;Dr. Ali
> tel;cell:703 625-5245
> tel;fax:703 883-1917
> tel;home:703 933-6064
> tel;work:703 883-6778
> x-mozilla-html:FALSE
> org:The Mitre Corporation;Centre for Advanced Aviation Systems
 Development
> adr:;;1820 Dolley Madison Blvd;Mclean;VA;22102;USA
> version:2.1
> email;internet:ali_at_mitre.org
> title:Sr. Soft. Systems Eng.
> fn:Ali Obaidi
> end:vcard
>
> --------------B424B6D0B8D0BD009979CC91--
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Dec 05 2000 - 21:40:16 CST

Original text of this message

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