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: easy in Access, but not in Oracle (query)

Re: easy in Access, but not in Oracle (query)

From: Kevin Kirkpatrick <kjk_at_hrb.com>
Date: Fri, 02 Oct 1998 08:08:42 -0400
Message-ID: <3614C249.C5F92FD4@hrb.com>


Yes, that is correct. I just tried it and it worked. I am not sure why I wasn't able to do that in the first place.

Thanks
Kevin

Mark Styles wrote:

> Fri, 02 Oct 1998 06:31:41 -0400, Kevin Kirkpatrick <kjk_at_hrb.com>
> rambled:
>
> >I have what will probably be an easy question to answer. Yesterday I
> >needed to update a table based on another table. Something like:
> >
> >table1 table2
> >
> >id id
> >name address
> >address
> >
> >What I was trying to do is move the address field of table2 into the
> >address field of table1. For some reason I wasn't able to do it in
> >oracle. I linked up to the database thru MS-Access and was able to do
> >it with Access. So, that kinda says that it can be done, but when I
> >used a similar sql query in oracle (same as the one MSAccess produced,
> >it still did not work. What would be the format for the UPDATE? A
>
> I would guess at:
>
> UPDATE table1
> SET address =
> (select address from table2 where table1.id = table2.id);
>
> this assumes that id is a primary key and therefore unique in both
> tables.
>
> Mark Styles
> Spam my account, lose your account. Clear enough?
> Religious tolerance is an oxymoron.
Received on Fri Oct 02 1998 - 07:08:42 CDT

Original text of this message

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