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: update question

Re: update question

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 27 Feb 2002 21:08:02 +0100
Message-ID: <u7qfrornkjshf7@corp.supernews.com>

"tony" <ttigger4321_at_hotmail.com> wrote in message news:3c7d1a39.16078802_at_news.dal.ca...
> Hi. I wonder if there are any restrictions associated with the update
> command with respect to like named columns in tables involved in the
> update. For example
>
> update table1 a
> from table2 b
> set col1 = b.col1
> where a.col2 = b.col2
> and a.col3 = b.col3
>
> returns a "ORA-00971: missing SET keyword"
>
> oracle 8i on aix
>
> thanks
> cheers,
> tony
> 494-1021 w
> 461-4550 h

It can be done, though with an inline view only  update
(select a.col1, b.col1
 from table1 a, table 2 b
 where a.col2 = b.col2
 and a.col3 = b.col3)
set a.col1 = b.col1

Please do not expect the Oracle SQL syntax is equivalent to sqlserver, sybase or whatever. Please consult the sql reference manual as often as possible.
Please forget everything you learned about sqlserver. It doesn't apply. Now who is setting the standard in terms of marketshare? sqlserver? I doubt so.

Regards

--
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address
Received on Wed Feb 27 2002 - 14:08:02 CST

Original text of this message

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