from the ( select cast( test as TYP_CCO_IMPUTACION )
from dual )
----- Original Message -----
From: "Chris Stephens" <ChrisStephens@affina.com>
To: <oracle-l@freelists.org>
Sent: Wednesday, March 03, 2004 4:59 PM
Subject: RE: Inserting records in a cursor
Excellent spanglish!
-----Original Message-----
From: Jamadagni, Rajendra [mailto:Rajendra.Jamadagni@espn.com]
Sent: Wednesday, March 03, 2004 2:56 PM
To: oracle-l@freelists.org
Subject: RE: Inserting records in a cursor
CREATE OR REPLACE TYPE ctb.tyo_cco_imputacion AS OBJECT(
nTotal NUMBER,
cCCO1 VARCHAR2(9),
cCCO2 VARCHAR2(9),
cCCO3 VARCHAR2(9),
cCCO4 VARCHAR2(9),
cCCO5 VARCHAR2(9),
nMonto NUMBER(16,2))
/
CREATE OR REPLACE TYPE ctb.typ_cco_imputacion AS TABLE OF
CTB.TYO_CCO_IMPUTACION;
/
create functoin load return ctb.typ_cco_imputacion is
TuBLA ctb.typ_cco_imputacion;
begin
for i in 1 .. 10
loop
TUBLA(i).nTotal := i;
TUBLA(i).cCCO1 := 'ccol1 ' || i;
TUBLA(i).cCCO2 := 'ccol2 ' || i;
TUBLA(i).cCCO3 := 'ccol3 ' || i;
TUBLA(i).cCCO4 := 'ccol4 ' || i;
TUBLA(i).cCCO5 := 'ccol5 ' || i;
TUBLA(i).nMonto := i;
end loop;
retturn tubla;
end;
/
something like this should work ...
Raj
----------------------------------------------------------------------------
----
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
select standard_disclaimer from company_requirements;
QOTD: Any clod can have facts, having an opinion is an art !
-----Original Message-----
From: oracle-l-bounce@freelists.org
[mailto:oracle-l-bounce@freelists.org]On Behalf Of Juan Cachito Reyes
Pacheco
Sent: Wednesday, March 03, 2004 3:43 PM
To: oracle-l@freelists.org
Subject: Re: Inserting records in a cursor
Could you please give a complete example creating a cursor, and adding
values and returning :) pleeease... if I'm not abusing of you.
I'm getting other error messages.
declare
Tabla ctb.typ_cco_imputacion;
begin
Tabla(1).ntotal := 1;
Tabla(2).ntotal := 1;
Tabla(3).ntotal := 1;
tabla(4).ntotal := 1;
--RETURN Tabla;
rollback;
end;
16:39:00 ORA-06531: Referencia a una recopilación no inicializada
----- Original Message -----
From: "Jamadagni, Rajendra" <Rajendra.Jamadagni@espn.com>
To: <oracle-l@freelists.org>
Sent: Wednesday, March 03, 2004 4:16 PM
Subject: RE: Inserting records in a cursor
you are probably confused between a table (a rdbms entity) and a collection
(aka pl/sql table). Collections do not use DML statements, you need to treat
them like arrays ... that's what they are.
Raj
----------------------------------------------------------------------------
----
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
select standard_disclaimer from company_requirements;
QOTD: Any clod can have facts, having an opinion is an art !
-----Original Message-----
From: oracle-l-bounce@freelists.org
[mailto:oracle-l-bounce@freelists.org]On Behalf Of Juan Cachito Reyes
Pacheco
Sent: Wednesday, March 03, 2004 3:07 PM
To: oracle-l@freelists.org
Subject: Inserting records in a cursor
Hi, maybe this is a stupid question, but I didn't it before, I want to
create a cursor load data, and return in in a funciton
something like
If you can please, thank you.
CREATE OR REPLACE
TYPE ctb.tyo_cco_imputacion AS OBJECT
(
nTotal NUMBER,
cCCO1 VARCHAR2(9),
cCCO2 VARCHAR2(9),
cCCO3 VARCHAR2(9),
cCCO4 VARCHAR2(9),
cCCO5 VARCHAR2(9),
nMonto NUMBER(16,2)
)
/
CREATE OR REPLACE
TYPE ctb.typ_cco_imputacion AS TABLE OF CTB.TYO_CCO_IMPUTACION;
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request@freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request@freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request@freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request@freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request@freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request@freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------