Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: little sql help

Re: little sql help

From: <jolimallick_at_my-deja.com>
Date: Wed, 27 Dec 2000 15:47:50 GMT
Message-ID: <92d2v5$di4$1@nnrp1.deja.com>

Try something like this:

UPDATE B
SET first_name = A.firstname, last_name = A.lastname
FROM A, B
WHERE A.id = B.id

You cannot use an alias on the update table. SQL assumes that you are setting the columns in the table specified after UPDATE.

Regards,
Joli Mallick

In article <927fp4$6a6$1_at_bob.news.rcn.net>,   "Ed Zappulla" <zappullae_at_rcn.com> wrote:
> Hi, I need a little help with an update
 statement. I have 2 tables linked
> by id and want to update table A with some data
 in table A. I want to set
> table B's last and first name from table A's.
 Ideas?
>
> A:
> id
> last_name
> fist_name
>
> B:
> id
> last_name
> fist_name
>
>

Sent via Deja.com
http://www.deja.com/ Received on Wed Dec 27 2000 - 09:47:50 CST

Original text of this message

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