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

Home -> Community -> Usenet -> c.d.o.misc -> Re: 2 scripts in one, possible???

Re: 2 scripts in one, possible???

From: Thorsten Kettner <thorsten.kettner_at_web.de>
Date: 8 May 2007 03:56:57 -0700
Message-ID: <1178621817.509220.101550@u30g2000hsc.googlegroups.com>


On 7 Mai, 16:28, valigula <valig..._at_gmail.com> wrote:
> Hi
>
> update table1 r set
> (c1, c2, c3, c4,
> c5, c6, c7)=
> ( SELECT c1, c2, c3, c4,
> c5, c6, c7
> from table2 i
> where i.c8 =c8)
>
> I´m doing an insert first to load the pk (c8) into table1 (that is the
> pk for table1).
> table2 has not pk so there are many c8.
> I was wondering if is possible to do both scripts in one go?

I don't understand what you are trying to do and I daresay others fail to understand as well. Just in case your actual question hasn't been answered yet, please elaborate: What is the relation between tabele1 and table2? Why does table2 have no pk? Why, if there are many records of table2 matching one record of table1, is there no aggregation in your select (say max, min, sum or whatever)? Received on Tue May 08 2007 - 05:56:57 CDT

Original text of this message

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