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: Updating a field of one table from another

Re: Updating a field of one table from another

From: Brian E Dick <bdick_at_cox.net>
Date: Thu, 09 May 2002 19:12:22 GMT
Message-ID: <qSzC8.6648$1a4.471080@news2.east.cox.net>


Try something like this.

update
(select f.tfn f_tfn, m.parent_key m_parent_key  from FC f, FC_MOD M
 where concat(F.ticker,'.CF')=M.ticker)
set m_parent_key = f_tfn

"todd seidel" <todd.seidel_at_tfn.com> wrote in message news:a566f6f6.0205091056.1f4afe58_at_posting.google.com...
> I'm attempting to update a field on one table
> with a different field from another. Here's the query that I'd like to
> use
>
> update FC_MOD m, FC f
> set FC_MOD.parent_key= FC.tfn
> where concat(F.ticker,'.CF')=M.ticker
>
> this is based on this simple select
>
> select f.tfn from FC f, FC_MOD M
> where concat(F.ticker,'.CF')=M.ticker
>
> I'm trying to update the parent_key field in the fc_mod table with the
> tfn of the fc table based on the joining statement
> concat(f.ticker,'.CF')=m.ticker
>
> I'm not sure how to do this...I've done some research but haven't
> found anything that works based on the criteria of this
Received on Thu May 09 2002 - 14:12:22 CDT

Original text of this message

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