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: Output to Excel

RE: Output to Excel

From: Thomas, Kevin <Kevin.Thomas_at_calanais.com>
Date: Fri, 05 Oct 2001 01:14:04 -0700
Message-ID: <F001.003A2FA2.20011005011523@fatcity.com>

I believe the error to be where you have:

OUT_REC TYPE REGISTRO; it should be: OUT_REC REGISTRO%TYPE;

-----Original Message-----
Sent: 04 October 2001 23:10
To: Multiple recipients of list ORACLE-L

Hi Jared,

Excuse me for contact you directly not throug the list.

The past week you post an answer to someone trying to write to excel, I took the example to generate a file comma separated, but getting an error.

 CREATE OR REPLACE PACKAGE BODY PROCESAR_AGENCIAS AS  PROCEDURE GENERAR_FACTURAS

  ( PGRUPO         IN NUMBER,    PCOMPANIA    IN NUMBER,
    PFECHA_INICIAL IN DATE,      PFECHA_FINAL IN DATE,
    PAGENCIA       IN NUMBER ) AS

 CURSOR C_FACTURAS IS
   SELECT F.GRUPO||','||
          F.COMPANIA||','||
          F.TIPO_FACTURA||','||
          F.AGENCIA||','||
          F.FACTURA||','||
          F.CLIENTE||','||
          F.VENDEDOR||','||
          F.DOCUMENTO_COBRO||','||
          F.FECHA||','||
          F.FECHA_PAGO||','||
          F.FECHA_VENCIMIENTO||','||
          F.ESTATUS_COMISION||','||
          F.COMISION_VENDEDOR||','||
          F.MONTO||','||
          F.MONTO_PAGADO||','||
          F.IMPRESA||','
   FROM FACTURAS F
      WHERE
   F.GRUPO       = PGRUPO         AND
   F.COMPANIA    = PCOMPANIA      AND
   F.AGENCIA     = PAGENCIA       AND

   F.FECHA BETWEEN PFECHA_INICIAL AND PFECHA_FINAL;  CURSOR C_ITEM_FACTURAS IS
   SELECT I.GRUPO||','||
          I.COMPANIA||','||
          I.AGENCIA||','||
          I.TIPO_FACTURA||','||
          I.FACTURA||','||
          I.LOCALIDAD||','||
          I.ARTICULO||','||
          I.SECUENCIA||','||
          I.COSTO||','||
          I.PRECIO_VENTA||','||
          I.CANTIDAD||','||
          I.ITBIS||','||
          I.DESCTO||','
   FROM FACTURAS F, ITEM_FACTURAS I
      WHERE
   F.GRUPO         = PGRUPO         AND
   F.COMPANIA      = PCOMPANIA      AND
   F.AGENCIA       = PAGENCIA       AND
   F.FECHA BETWEEN   PFECHA_INICIAL AND
                     PFECHA_FINAL   AND
   I.GRUPO         = F.GRUPO        AND
   I.COMPANIA      = F.COMPANIA     AND
   I.TIPO_FACTURA  = F.TIPO_FACTURA AND
   I.FACTURA       = F.FACTURA;
   V_ARCHIVO         UTL_FILE.FILE_TYPE;
   REGISTRO         FACTURAS%ROWTYPE;  ************* I declare it here
   OUT_REC TYPE REGISTRO;              *************

 BEGIN

PL/SQL: Statement ignored
PLS-00302: component 'OUT_REC' must be declared PL/SQL: Statement ignored
PLS-00302: component 'OUT_REC' must be declared

How should I Declare it.

I did

 REGISTRO FACTURAS%ROWTYPE;
 OUT_REC TYPE REGISTRO; Is there something missing ?

Any help !!

Thanks in Advance,

Ramon E. Estevez
com.banilejas_at_codetel.net.do
Dominican Republic
809-565-3121

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Ramon Estevez
  INET: com.banilejas_at_codetel.net.do

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Thomas, Kevin
  INET: Kevin.Thomas_at_calanais.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Fri Oct 05 2001 - 03:14:04 CDT

Original text of this message

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