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: Simple update query from joined tables

Re: Simple update query from joined tables

From: Olivier <marcou.olivier_at_wanadoo.fr>
Date: Sat, 3 Aug 2002 18:58:31 +0200
Message-ID: <aih23i$d6u$1@wanadoo.fr>


Why did you create two tables if they have the same key field ? :-) One table, which have three string fields String_1, String_2, String_3 and key field key1, is better, isn't it

Olivier

"Cornell news" <cornwell_at_clarityconnect.com> a écrit dans le message de news: aibpsj$gsh$1_at_news01.cit.cornell.edu...
> I have had a very difficult time trying to figure this out:
>
> How do I update a table value from another table with matching keys in a
> single UPDATE statement.
>
> Here's a scenario:
>
> Table_A has string fields String_1, and String_2
> Table_B has fields String_3
> Both tables have key fields key1
>
> Write an Update statement that concatenates the values of String_1 and
> String_3 - and places the result in String_2 field for matching (by Key1)
> rows in Table_A.
>
> So, for every matching Table_B row, update Table_A.String_2 field with
the
> (Table_A.String_1||Table_B.String_3) value.
>
>
> TIA,
> Tim C.
>
>
>
>
Received on Sat Aug 03 2002 - 11:58:31 CDT

Original text of this message

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