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: SOLVED: How to define a Type with multiple columns ,for bulk fetch

Re: SOLVED: How to define a Type with multiple columns ,for bulk fetch

From: Juan Cachito Reyes Pacheco <jreyes_at_dazasoftware.com>
Date: Wed, 10 Mar 2004 18:40:23 -0400
Message-ID: <00ce01c406f0$b0c1b8e0$2501a8c0@dazasoftware.com>


Thank you
Yes, but create an object for every specific select, that gathers specific columns, you
will have lot and lot of objects.

> How about creating it as an Object.
>
> create type address_type as object
> (street varchar2(50),
> city varchar2(25),
> state char(2),
> zip number);
>
>
> -----Original Message-----
> From: Juan Cachito Reyes Pacheco [mailto:jreyes_at_dazasoftware.com]
> Sent: Wednesday, March 10, 2004 4:07 PM
> To: oracle-l_at_freelists.org
> Subject: SOLVED: How to define a Type with multiple columns ,for bulk
> fetch
>
>
> tCTS_CUENTA DBMS_SQL.VARCHAR2_TABLE;
>
> tCTS_MONEDA DBMS_SQL.VARCHAR2_TABLE;
>
> CURSOR uLiq IS
>
> SELECT CTS_CUENTA, CTS_MONEDA
>
> FROM CTALIQFON, CUENTAS
>
> WHERE CTS_CUENTA = LQF_CUENTA;
>
> BEGIN
>
> fetch uLiq bulk collect into tCTS_CUENTA,tCTS_MONEDA;
>
>
>
> ----- Original Message -----
> From: "Juan Cachito Reyes Pacheco" <jreyes_at_dazasoftware.com>
> To: <oracle-l_at_freelists.org>
> Sent: Wednesday, March 10, 2004 5:42 PM
> Subject: How to define a Type with multiple columns ,for bulk fetch
>
>
> > Hi sorry another question more, how can I define a type with TWO OR MORE
> > columns
> > to bulk fetch in this way
> >
> > DECLARE
> > TYPE TEST IS TABLE OF VARCHAR2(20);
> > TEST1 test;
> > i number := 0;
> > cursor c is SELECT LQF_CUENTA FROM CTALIQFON;
> > BEGIN
> > open c;
> > loop
> > fetch c bulk collect into test1;
> > for i in 1..test1.count loop
> > dbms_output.put_line(test1(i));
> > end loop;
> > exit when c%notfound;
> > end loop;
> >
> >
> >
> > For one column I can do this
> > TYPE TEST IS TABLE OF VARCHAR2(20);
> >
> > If I use a table I can do this
> > TABLA TYPE TEST IS TABLE LATABLA%ROWTYPE;
> >
> > Now if I do something like
> > TYPE tLiq IS RECORD (
> > CTS_CUENTA VARCHAR2(20),
> > CTS_MONEDA VARCHAR2(3));
> >
> > fetch c bulk collect into tLiq, gives error.
> > pls-00403
> >
> >
> > Thanks
> >
>
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to: oracle-l-request_at_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_at_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_at_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
-----------------------------------------------------------------
Received on Wed Mar 10 2004 - 16:40:29 CST

Original text of this message

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