Re: Updating Help
From: <catherine_devlin_at_purpleturtle.com>
Date: 26 Jun 2001 15:13:16 GMT
Message-ID: <9ha8qc$d6s$1_at_news.netmar.com>
Date: 26 Jun 2001 15:13:16 GMT
Message-ID: <9ha8qc$d6s$1_at_news.netmar.com>
update a
set a.data =
( select b.src
from b
where a.id = b.id )
where a.id in
( select b.id
from b )
Good luck!
- Catherine
In article <lct8jtsevvs6ak18org0m9dm7oc7884d8o_at_4ax.com>, JDoe <x_at_x.com>
writes:
>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!
- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web ----- http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups NewsOne.Net prohibits users from posting spam. If this or other posts made through NewsOne.Net violate posting guidelines, email abuse_at_newsone.net