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: Thomas Gaines <Thomas.Gaines_at_noaa.gov>
Date: Thu, 01 Aug 2002 14:39:06 -0600
Message-ID: <3D499C6A.82DC52E1@noaa.gov>


Tim -

I just now noticed this posting. I posted a nice solution for you on this very same question over
on the P2P site. Check it out.

You aren't serious about the $10, are you? ;-)

Tom

Tim C wrote:

> $10 to you - if you think you can solve it.
>
> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message
> news:l7uikuc81pflpgeaou5nd1e7a94cpiga40_at_4ax.com...
> > On Thu, 1 Aug 2002 12:56:11 -0400, "Cornell news"
> > <cornwell_at_clarityconnect.com> wrote:
> >
> > >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.
> > >
> > >
> > >
> >
> > How much do you pay for making your homework assignments?
> >
> > Regards
> >
> >
> >
> > Sybrand Bakker, Senior Oracle DBA
> >
> > To reply remove -verwijderdit from my e-mail address
Received on Thu Aug 01 2002 - 15:39:06 CDT

Original text of this message

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