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: update tablexx from

Re: update tablexx from

From: Rob <root_at_127.0.0.1>
Date: Mon, 20 Mar 2000 20:52:21 -0500
Message-ID: <8b6kkr$f2q$1@bob.news.rcn.net>


There is a "slight" problem with all the examples, and your example: Every row in bcd will be updated to the same cusomer_nm. So, you need to narrow the query down on bcd to a row. that is unless you want to update every row.

--
Robert P. Lockard
rob_at_oraclewizard.com
www.oraclewizard.com will be online soon.

"slightly" flawed examples.
update bcd
set cust_name =
(select customer_nm
 from dr11_order_temp
 where customer_nm=synnex);

or

define name='synnes'
declare
  cursor c1 is
  select customer_nm
  from dr11_order_tmp
  where customer_nm=&synnex;
begin
  for rec in c1
  loop
    update bcd
    set cust_name = rec.customer_nm;
  end loop;
end;

> update bcd
> set set b.cust_name=dr11.customer_nm
> from bcd b, dr11_order_tmp dr11
> where dr11.customer_nm='synnex

"Maggie" <maggiezhou_at_hotmail.com> wrote in message news:8b6idc$jh$1_at_web1.cup.hp.com...
> I ran the query but
> update bcd
> set set b.cust_name=dr11.customer_nm
> from bcd b, dr11_order_tmp dr11
> where dr11.customer_nm='synnex
>
> But I got
> SQL> /
> from bcd b,dr11_orders_tmp dr11
> *
> ERROR at line 3:
> ORA-00933: SQL command not properly ended
>
> ------
> Is there " from " after set in update in Oracle?
>
>
Received on Mon Mar 20 2000 - 19:52:21 CST

Original text of this message

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