| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: little sql help
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
![]() |
![]() |