Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Quick compare of PL/SQL records

Re: Quick compare of PL/SQL records

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Fri, 29 Apr 2005 14:06:59 +0000
Message-Id: <1114783619l.12921l.1l@medo.noip.com>

On 04/29/2005 09:23:41 AM, Ranko Mosic wrote:
> Yes, I know what manual says - that's why I am posting the question here.=
=3D
> =3D20
> The thing is, I need to compare about 100 types of records with dozens of=
=3D
> =3D20
> attributes each. I would like to be able to avoid field level
> comparison and do it
> on record level.
> rm=3D20

Ranko, I am afraid that this isn't possible, not even in 10g which has some= thing called
"aggregate asignment", but it still lacks aggregate comparison. You can do = it if you=20
(Gawd, this is so hard to say!) use Java in the database instead of PL/SQL.=  Here is
a little example which DOESN'T work:
declare
cursor csr is select * from emp1;
behead csr%rowtype;
begin
select * into behead from emp where ename=3D'KING'; for c in csr
loop
if (c=3Dbehead) then

   dbms_out.put_line('Got it!');
end if;
end loop;
end;
/

if (behead=3Dc) then

          *
ERROR at line 8:

ORA-06550: line 8, column 11:
PLS-00306: wrong number or types of arguments in call to '=3D'
ORA-06550: line 8, column 1:

PL/SQL: Statement ignored

Wrong types of arguments in call to '=3D'. Abandon all hope ye who enter he= re.

--=20
Mladen Gogala
Oracle DBA

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Apr 29 2005 - 10:11:22 CDT

Original text of this message

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