From oracle-l-bounce@freelists.org Wed Mar 3 14:53:30 2004 Return-Path: Received: from air189.startdedicated.com (root@localhost) by orafaq.com (8.11.6/8.11.6) with ESMTP id i23KrTg30898 for ; Wed, 3 Mar 2004 14:53:29 -0600 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i23KrRo30888 for ; Wed, 3 Mar 2004 14:53:28 -0600 Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 28EE13951D6; Wed, 3 Mar 2004 15:53:17 -0500 (EST) Received: with ECARTIS (v1.0.0; list oracle-l); Wed, 03 Mar 2004 15:52:05 -0500 (EST) X-Original-To: oracle-l@freelists.org Delivered-To: oracle-l@freelists.org Received: from ihub.perceptron.com (ihub.perceptron.com [68.22.13.201]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 3F9F5394C45 for ; Wed, 3 Mar 2004 15:52:01 -0500 (EST) Received: from [192.168.4.7] (ineyman@perceptron.com) by Office-Logic InterChange; Wed, 03 Mar 2004 15:57:22 -0500 From: "Igor Neyman" To: Subject: RE: Inserting records in a cursor Date: Wed, 3 Mar 2004 15:55:52 -0500 Message-ID: <003e01c40161$e9feec70$0704a8c0@development.perceptron.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by Ecartis X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 In-Reply-To: <00e601c40160$3f239040$2501a8c0@dazasoftware.com> Importance: Normal X-archive-position: 245 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: ineyman@perceptron.com Precedence: normal Reply-To: oracle-l@freelists.org X-list: oracle-l Before using an element in the collection, you should extend collection (initialize collection element): First: Tabla.EXTEND; Then: Tabla(1).ntotal := 1; And so on... Igor Neyman, OCP DBA ineyman@perceptron.com -----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" To: 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. tubla[1].ntotal := 1; tubla[2].ntotal := 1; tubla[3].ntotal := 1; tubla[4].ntotal := 1; 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; / create functoin load return ctb.typ_cco_imputacion TuBLA typ_cco_imputacion; begin insert into TUBLA values(1,2,3,4); insert into TUBLA values(1,4,3,4); .... retturn tubla end; ---------------------------------------------------------------- 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 -----------------------------------------------------------------