Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: What is wrong with my SQL ?
On Fri, 26 Mar 1999 13:10:42 +0100, "Jørgen Haukland"
<jorgen.hauikland_at_fou.telenor.no> wrote:
>Hello !
>
>I'm trying to update a column in my main table with values from a similar
>column in another table when the primary keys column match. This is my SQL:
>
> UPDATE TableA
> SET TableA.Col1 = TableB.Col1
> WHERE TableA.PrimaryKeyCol = TableB.PrimaryKeyCol
>
>I get an "invalid column name" error whenn I try this.
>
>What is wrong ?
>
>Joergen Haukland
>NORWAY
>
You should try something like this :
UPDATE TabelA SET TabelA.Col1 = (SELECT TableB.Col FROM TableB WHERE
TableB.PrimaryKeyCol = TabelA.PrimaryKeyCol)
Lars Kristiansen
email: lars.kristiansen_at_bergen.online.nospam
~ Remove spam to reply ~
Received on Fri Mar 26 1999 - 06:38:24 CST
![]() |
![]() |