.ora-code.com

Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
Quick compare of PL/SQL records

Quick compare of PL/SQL records

2005-04-29       - By Gints Plivna
Reply:     1     2     3     4     5     6     7     8     9     10  

The only sensible built in comparison I could imagine with records
probably is equivalence i.e. as it is for object types (and also only
in SQL not PL/SQL as you can see below). But I cannot imagine how one
can define built in operators like > or < for records, because each
record could have very special meaning for his member fields.

17:10:07 gints@(protected)> create type objtype as object (a number, b number)=
;
17:10:29   2  /

Type created.

Elapsed: 00:00:00.00
17:10:30 gints@(protected)> create table objtab (a objtype);

Table created.

Elapsed: 00:00:00.00
17:10:58 gints@(protected)> insert into objtab values (objtype(1, 1));

1 row created.

Elapsed: 00:00:00.00
17:11:19 gints@(protected)> select * from objtab where a =3D a;

A(A, B)
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --=
-- ---- ----
OBJTYPE(1, 1)

1 row selected.

Elapsed: 00:00:00.00
17:11:38 gints@(protected)> select * from objtab where a > a;
select * from objtab where a > a
                          *
ERROR at line 1:
ORA-22950 (See ORA-22950.ora-code.com): cannot ORDER objects without MAP or ORDER method


Elapsed: 00:00:00.00
17:11:44 gints@(protected)> declare
17:11:51   2  var1 objtype;
17:11:57   3  var2 objtype;
17:12:03   4  begin
17:12:06   5    var1 :=3D objtype(1, 1);
17:12:17   6    var2 :=3D objtype(1, 1);
17:12:25   7    if var1 =3D var2 then=20
17:12:37   8      null;
17:12:40   9    else=20
17:12:43  10      null;
17:12:48  11    end if;
17:12:50  12  end;
17:12:52  13  /
 if var1 =3D var2 then
         *
ERROR at line 7:
ORA-06550 (See ORA-06550.ora-code.com): line 7, column 11:
PLS-00526: A MAP or ORDER function is required for comparing objects in PL/=
SQL.


Elapsed: 00:00:00.00
17:12:53 gints@(protected)>=20



On 4/29/05, Ranko Mosic <ranko.mosic@(protected)> wrote:
> Yes, I know what manual says - that's why I am posting the question here.
> The thing is, I need to compare about 100 types of records with dozens of
> attributes each. I would like to be able to avoid field level
> comparison and do it
> on record level.
> rm
>
--
http://www.freelists.org/webpage/oracle-l