Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: fetch out of sequence
Never mind found what I was looking for in. I hate when I forget =
something I knew. Also, in SQL Server syntax for this is much easier. =20
Note:2187.1=20
Subject: Explanation of Complex Correlated SQL UPDATE Statements=20
Type: BULLETIN=20
Status: PUBLISHED=20
Content Type: TEXT/PLAIN=20
Creation Date: 24-DEC-1992=20
Last Revision Date: 02-JAN-2003=20
=20
Purpose:=20
-----Original Message-----
From: Stankus, Paula G=20
Sent: Monday, August 23, 2004 1:31 PM
To: Stankus, Paula G; 'oracle-l_at_freelists.org'
Subject: RE: fetch out of sequence
Rewriting into an update - I am testing a multiple column - join update:
1 update
2 (select a.last_name, b.last_name
3 from emp a, person b 4 where a.emp_id =3D b.person_id)5* set a.last_name =3D b.last_name
Name Null? Type ----------------------------------------- -------- =
----------------------------
PERSON_ID NUMBER LAST_NAME VARCHAR2(50) FIRST_NAME VARCHAR2(50) LOADDATE DATE SQL> desc emp; Name Null? Type ----------------------------------------- -------- =
----------------------------
EMP_ID NUMBER(38) LAST_NAME VARCHAR2(50) FIRST_NAME VARCHAR2(50) LOADDATE DATE
When I execute the above update, I get the error:
set a.last_name =3D b.last_name
*
What am I doing wrong?
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.htmlReceived on Mon Aug 23 2004 - 12:45:41 CDT
-----------------------------------------------------------------
![]() |
![]() |