Re: Updating Help

From: Bhooshan S. Prabhu <bhooshan.prabhu_at_citicorp.com>
Date: 28 Jun 2001 02:13:45 -0700
Message-ID: <2cf4efe2.0106280113.63c06514_at_posting.google.com>


JDoe <x_at_x.com> wrote in message news:<65objtsc70cn5jd97l3t70s5tr77eiltp8_at_4ax.com>...
> Hi,
>
> I have these tables in my database
>
> Table A
> ID NUMBER(10)
> DATA NUMBER(10)
>
> Table B
> ID NUMBER(10)
> SRC NUMBER(10)
>
> There is a one-to-one relationship between
> A.ID and B.ID
>
> What I would like to do is "copy"
> the contents of B.SRC to A.DATA wherever
> A.ID = B.ID
>
> I can't quite make out the update
> query for this. I know using cursors would
> work but I'd like to avoid it if possible.
>
> thanks!
Try the following
update a
set DATA=(select SRC from b where id = a.id) / Received on Thu Jun 28 2001 - 11:13:45 CEST

Original text of this message