How to run a procedure of SQL commands

I tried in many ways, for example:

RUN POPULATE_HIERARCHY (121121);

but I get the error: ORA-00900: invalid SQL statement.
BEGIN
  POPULATE_HIERARCHY(121121);
END;

Tags: Database

Similar Questions

  • How to run a procedure with parameters in pl/sql collections?

    I created a procedure with parameter from the collection. Can somone help me how to run a procedure in passing the parameters in the collection.
    Package and how to create is successful. But I get the error message when executing the procedure.

    ORA-06550: line 3, column 19:
    PLS-00222: no function with name 'T_TAB' does exist in this scope

    I gave the example of code here. Can someone please help me solve this problem.

    -Spec package

    create or replace package pkg_dist is

    TABLE index IS THE NUMBER of t_tab_num TYPE of PLS_INTEGER;


    procedure prc_test (a t_tab_num IN,
    b IN t_tab_num,
    c IN OUT t_tab_num);
    end pkg_dist;

    -Package body

    create or replace package body is pkg_dist

    procedure prc_test (a t_tab_num IN,
    b IN t_tab_num,
    c IN OUT t_tab_num) is


    Start


    IF (a (16) = 0) then
    (16) c: = 0;
    c (17): = 0;
    c (18): = 0;
    end if;
    c (15): = (14)-(15)-a (16);
    (16) c: = b (16) /b (17);
    c (17): = 50;
    (18) c: = a (16) * 2;

    end prc_test;
    end pkg_dist;

    -executeing procedure

    declare
    TABLE index IS THE NUMBER of t_tab TYPE of PLS_INTEGER;
    x t_tab: = t_tab (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16);
    y t_tab: = t_tab (0,10,15,20,25,30,35,40,45,50,60,75,100,125,150,200,250,500);
    z t_tab;
    BEGIN
    pkg_dist.prc_test (x, y, z);
    dbms_output.put_line (z (18));
    END;

    Error:
    --------------------------------------------------------------------------------
    ORA-06550: line 3, column 19:
    PLS-00222: no function with name 'T_TAB' does exist in this scope

    My suggestion would be:

    CREATE OR REPLACE PACKAGE pkg_dist IS
    
       PROCEDURE prc_test (a IN SYS.odcinumberlist, b IN SYS.odcinumberlist, c IN OUT SYS.odcinumberlist);
    END pkg_dist;
    
    CREATE OR REPLACE PACKAGE BODY pkg_dist IS
       PROCEDURE prc_test (a IN SYS.odcinumberlist, b IN SYS.odcinumberlist, c IN OUT SYS.odcinumberlist) IS
       BEGIN
          IF (a (16) = 0) THEN
             c (16) := 0;
             c (17) := 0;
             c (18) := 0;
          END IF;
    
          c (15) := a (14) + a (15) + a (16);
          c (16) := b (16) / b (17);
          c (17) := 50;
          c (18) := a (16) * 2;
       END prc_test;
    END pkg_dist;
    /
    
    DECLARE
       x   SYS.odcinumberlist;
       y   SYS.odcinumberlist;
       z   SYS.odcinumberlist;
    BEGIN
       x := sys.odcinumberlist (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16);
       y := sys.odcinumberlist (0,10,15,20,25,30,35,40,45,50,60,75,100,125,150,200,250,500);
       z := sys.odcinumberlist (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
       pkg_dist.prc_test (x, y, z);
       DBMS_OUTPUT.put_line (z (18));
    END;
    /
    

    See you soon,.
    Manik.

  • How to run a procedure with refcursor to more

    an entry is User_id = CMSH_USER; p_Ot-num =-9999; p_ppst_flag = 'P' and I want to take the trace by running this procedure, and any1 help me, how to run this procedure below and how to use these 5 on refcursor...
     procedure Pr_get_mny(p_ot_Num      IN NUMBER,
                                     p_User_Id      IN VARCHAR2,
                                     p_Ppst_Flag IN VARCHAR2,
                                     Ref_Cur        OUT Ref_Cursor,
                                     CUR_OPT        OUT Ref_Cursor,
                                     CUR_TAXRATE    OUT Ref_Cursor,
                                     CUR_TAXHOLD    OUT Ref_Cursor,
                                     CUR_PENDGAACNT OUT Ref_Cursor
                                     ) IS

    If the goal is to Test, the best tool is SQL

    var ref_cur refcursor
    var cur_opt refcursor
    var cur_taxrate refcursor
    var cur_taxhold refcursor
    var cur_pendgaacnt refcursor 
    
    exec pr_get_mny(-9999,'CMSH_USER','P',:ref_cur,:cur_opt,:cur_taxrate,:cur_taxhold,:cur_pendgaacnt)
    
    print ref_cur
    print cur_opt
    print cur_taxrate
    print cur_taxhold
    print cur_pendgaacnt
    
  • How to run a procedure with the object as OUTPUT parameter

    Hello

    I have a procedure and it composed of 2 parameters, there is an input parameter and it's some ID (NUMBER datatype) and 2nd parameter is an output parameter and it an object type. I want to run this procedure, but not able to do the same thing. Can someone please suggest me how to run a procedure that got the object as output parameter.

    Thank you very much in advance for your support.

    Example:

    SQL> create or replace type t_obj as object (ename varchar2(10), deptno number);
      2  /
    
    Type created.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  create or replace procedure myproc (p_empno in number, obj out t_obj) is
      2  begin
      3    select t_obj(ename, deptno)
      4    into obj
      5    from emp
      6    where empno = p_empno;
      7* end;
    SQL> /
    
    Procedure created.
    
    SQL> set serverout on
    SQL> declare
      2    v_obj t_obj;
      3  begin
      4    myproc(7788, v_obj);
      5    dbms_output.put_line(v_obj.ename||','||v_obj.deptno);
      6  end;
      7  /
    SCOTT,20
    
    PL/SQL procedure successfully completed.
    
  • How to run DBMS_SQLTUNE.report_sql_monitor of SQL Developer 4.0

    Hello-

    We have new SQL Developer 4.0 as a single stop for all reports of performance tuning.

    (So far, we know how to generate the AWR and ASH ADDM directly from SQL DEV 4.0 and we can do as a NON-privileged user)

    Now, the question is how to run DBMS_SQLTUNE.report_sql_monitor API SQL DEV 4.0?

    I tried this way:

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    SELECT DBMS_SQLTUNE.report_sql_monitor)

    sql_id = >: SQL_ID

    Type = > 'TEXT ',.

    report_level = > 'ALL') AS myreport

    DOUBLE;

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    and then right button click of the mouse on the line "myreport" and the EXPORT of 'text' in the menu drop down and save in the. FichierTSV on the local file system.

    It works this way, as expected, but seems to be a lot of hassle: too many steps.

    Then I tried the HTML format:

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    SELECT DBMS_SQLTUNE.report_sql_monitor)

    sql_id = >: SQL_ID

    Type = > 'HTML. "

    report_level = > 'ALL') AS myreport

    DOUBLE;

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    and it didn't work well at all SQL dev 4.0

    Any help will be greatly appreciated.

    (once again, the idea here is to set up our development and QA groups with full access to performance all reports without having them call DBA for help in the production of any SQL tuning report).

    Thank you

    VR

    There is certainly a 'room' to improve the interface, just tell me what you would like to be like him. For example, you want an overview of the SGS of all SQLIDs running on the nodes you could then select this option to run a report for? Don't say it is what we would do, but I was wondering what it is that you ask for.

  • How to run a procedure?

    Hello:

    I am trying to execute this procedure with HR:

    CREATE or REPLACE PROCEDURE proc_depto_1 (new_dept_name IN VARCHAR2, dept_id in NUMBER)
    AS
    BEGIN
    UPDATE services
    SET department_name = new_dept_name
    WHERE department_id = dept_id;
    END;

    The procedure has been created successfully = 'created Procedure '.

    I tried proc_depto_1 EXECUTE ('wow', 90) and it does not work with the page interface web oracle 10g express edition but it works perfectly with the sql command line.

    Could someone tell me the statement for execution of the procedure in the web page tool or how to configure it to work?

    Thank you very much

    Published by: user12229399 on 18-ene-2010 04:42

    To try:

    BEGIN
    proc_depto_1 ('wow', 90);
    END;

  • How to run four procedures, in order, by using anonymous block

    Hello

    I am trying to run four procedures, in order, by using anonymous block. If one of the procedure fails remaining should get executed. How can I achieve this?
    For example:
    BEGIN
    PROC1;
    Proc2; -Suppose that Proc2 will fail, it should not affect the execution of Proc3 and proc 4
    Proc3;
    Proc 4;
    END;

    Thank you!

    Hello

    Maybe this can help you:

    BEGIN
      begin
        Proc1;
      exception
        when others then
          dbms_output.put_line('proc1 ' || sqlcode || ' ' || sqlerrm);
      end;
      begin
        Proc2;
      exception
        when others then
          dbms_output.put_line('proc2 ' || sqlcode || ' ' || sqlerrm);
      end;
      begin
        Proc3;
      exception
        when others then
          dbms_output.put_line('proc3 ' || sqlcode || ' ' || sqlerrm);
      end;
      begin
        Proc4;
      exception
        when others then
          dbms_output.put_line('proc4 ' || sqlcode || ' ' || sqlerrm);
      end;
    END;
    

    In your case, it may be useful if your procedures have their own exception handlers, so they never fail. But then you need a sort of exception information that is displayed.

    concerning
    Kay

  • How to create multiple tables with SQL commands

    Hi, first of all, is it possible to create a table and then one more both with SQL commands?
    because I tried to do this in the following way
    Example:
    CREATE TABLE 'HB_Product')
    "productId" number 4 NOT NULL.
    "productName" VARCHAR2 (20) NOT NULL,
    "prodPricePerTon" NUMBER (10,2).
    "HB_Product_PK" PRIMARY KEY CONSTRAINT ("productId")
    )
    /
    CREATE TABLE 'HB_Operations')
    "orderNo" NUMBER (5) NOT NULL,
    'lineNo' number 4 NOT NULL.
    "billNo" NUMBER (10) NOT NULL,
    'actions' VARCHAR2 (15).
    'place' VARCHAR2 (15).
    "actDate" DATE NOT NULL,
    "totWeight" NUMBER (6.3).
    'HB_Operations_PK' CONSTRAINT PRIMARY KEY ('lineNo')
    )
    /

    I copied some of the syntax for creating the table object browser, but I preffer to use my own sql.
    It gives me an error "Missing or option not valid."

    Can someone explain to me how to do it properly, or why it is not possible?

    Best regards from Stan!

    862377 wrote:
    so you're saying I can't do several tables at the same time?

    Yes... Well,... not this way

    You can do this way

    create schema authorization alex
    CREATE TABLE "HB_Product" (
    "productId"    NUMBER(4) NOT NULL,
    "productName"    VARCHAR2(20) NOT NULL,
    "prodPricePerTon"    NUMBER(10,2),
    CONSTRAINT "HB_Product_PK" PRIMARY KEY ("productId")
    )
    CREATE TABLE "HB_Operations" (
    "orderNo"    NUMBER(5) NOT NULL,
    "lineNo"    NUMBER(4) NOT NULL,
    "billNo"    NUMBER(10) NOT NULL,
    "actions"    VARCHAR2(15),
    "place"    VARCHAR2(15),
    "actDate"    DATE NOT NULL,
    "totWeight"    NUMBER(6,3),
    CONSTRAINT "HB_Operations_PK" PRIMARY KEY ("lineNo")
    )
    /
    

    The question is: why do you want to create "at the same time? What is the harm in creating one after the other?

    some tips (maybe not desired):
    do not use quotation marks in your statement, this will create column names and the table out.

  • How to run a procedure created dynamically with out parameter

    Hi guys,.

    a friend I need to run a procedure whose name will change dynamically and this procedure is with 2 out parameter. I need to capture the value of these 2 output settings, here I m giving my code too...

    declare
    int v_emp_id: = 100013;
    p_reg_off varchar (5): = "R";
    int p_user_id: = 6;
    v_status varchar (200);
    v_message varchar (200);
    v_Formula varchar (100);
    int v_number: = 1;

    Start
    v_Formula: = 'call testsp_ | v_number | ' ('| v_emp_id |', "'| p_reg_off |") «, » || p_user_id | v_status, v_message)';
    DBMS_OUTPUT. Put_line (v_Formula);
    immediately run v_Formula;
    end;


    and my procedure structure is like this


    CREATE OR REPLACE PROCEDURE testsp_1
    (
    p_emp_id INT,
    p_reg_off TANK,
    p_user_id INT,
    p_status OUT NOCOPY INT,
    p_message OUT NOCOPY VARCHAR2
    )
    AS
    Start
    end;

    Please help me...

    Hello

    You must use the "USING" clause to execute dynamic sql with parameter out.

    Example: http://download-west.oracle.com/docs/cd/B28359_01/appdev.111/b28370/dynamic.htm

    Arun-

  • How to run a procedure ODI of a shell command?

    Hello

    Is it possible to perform the procedure ODI of a shell command? How?

    I would like to invoke the execution of the second another batch processing procedure, we have tips.

    Thank you.

    You can create the scenario of the ODI procedure and call this scenario using the startscen at the command prompt,
    before that make sure that you odiparams file is updated.

  • How to run FNDMLSUB - multilingual - PL/SQL

    Hello

    I want to introduce a program FNDMLSUB (ask for the submission of Multi-Language) to PL/SQL (need to print several programs of Bill at once, there is no support from the MLS for the games of the application).
    What is the procedure of pl/sql for submission? I submit, but I don't know how to link with the actual demand (settings ect).


    l_request_id: = fnd_request.submit_request ("FND", "FNDMLSUB," ", null, FALSE, 20003, 191349, 'Y');


    Thank you

    Kind regards
    Kris

    An API to run simultaneous queries using MLS does not exist for the moment!

    Must find Metalink carefully at the beginning:
    How to apply MLS using API FND_REQUEST [ID 372572.1]

  • Problem with the new line when you manually run a procedure in SQL * more

    The procedure below works fine in SQL * more when all EXEC < procedure_name > (parameter1, parameter 2,...); is placed on a single line
    SQL > exec cust_admin_util.create_schema (P_SCHEMA_NAME => 'SCOTT_01', P_SCHEMA_PWD => 'scott123', P_TBS_NAME => 'TRAG_TBS', p_temptbs_name => 'TEMP' );
    
    PL/SQL procedure successfully completed.
    I wanted to perform the same procedure with readability. So, I put each parameter on a separate line and try to run. But it's the slightest mistake out.
    SQL > exec cust_admin_util.create_schema
    (
    P_SCHEMA_NAME => 'TESTUSR_01',
    P_SCHEMA_PWD => 'scott123',
    P_TBS_NAME => 'TRAG_TBS',
    p_temptbs_name => 'TEMP'
    );BEGIN cust_admin_util.create_schema; END;
    
          *
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'CREATE_SCHEMA'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    
    
    SQL >   2    3    4    5    6    7
    P_SCHEMA_NAME => 'TESTUSR_01',
    *
    ERROR at line 2:
    ORA-00928: missing SELECT keyword
    No work around for this?

    Tom wrote:

    No work around for this?

    BEGIN
    cust_admin_util.create_schema
    (
    P_SCHEMA_NAME => 'TESTUSR_01',
    P_SCHEMA_PWD => 'scott123',
    P_TBS_NAME => 'TRAG_TBS',
    p_temptbs_name => 'TEMP'
    );
    END;
    /
    

    SY.

  • How to run a procedure of APEX?

    Good night

    I have created a process to read a flat file and stores it in a database, I've tried for SQL console and it worked very well, so I created an application that calls the procedure of the button, but not agree, it must be

    file_browse: select the file to load...

    Source
    Process [Download Source]
    -------------------------------------------------- -------------------------------------------------- ---------
    Declare
    Start
    Proc_Read_File (: P5_LECTURA_ARCHIVOS)
    end;
    -------------------------------------------------- -------------------------------------------------- ---------

    UTL_FILE procedure works, to do something?

    I appreciate your attention and offered cooperation


    This is the process:



    DECLARE
    utl_file.file_type v1.
    VARCHAR2 (2048) v2;
    number now; -Cuenta el total of characters...
    CAR1 number; -Cuenta the del character position 1
    car2 number; -Cuenta the del character position 1
    number of tot_comas; -Contador comas
    ACUM NUMBER;
    CADEN VARCHAR2 (200);
    NUMBER OF TOTAL_CAR;
    POS_1 NUMBER;
    POS_2 NUMBER;
    Number of rest;
    Number of Cont_Filas;
    cod_archivo varchar2 (70);
    -Declaracion las columns
    col_1 aaa_p_hisfac_alc. Type of SUSCRIPTOR %;
    col_2 aaa_p_hisfac_alc. Type of NUM_CONTRATO %;
    col_3 aaa_p_hisfac_alc. Type of COD_DANE_DPTO %;
    col_4 aaa_p_hisfac_alc. Type of COD_DANE_MPIO %;
    col_5 aaa_p_hisfac_alc. Type of ZONA_IGAC %;
    col_6 aaa_p_hisfac_alc. Type of SECTOR_IGAC %;
    col_7 aaa_p_hisfac_alc. Type of MANZANA_VEREDA %;
    col_8 aaa_p_hisfac_alc. Type of NUM_PREDIO %;
    col_9 aaa_p_hisfac_alc. Type of CONDICION_PREDIO %;
    COL_10 aaa_p_hisfac_alc. Type of DIRECCION_PREDIO %;
    Col_11 Aaa_P_Hisfac_Alc.Num_Factura%Type;
    Col_12 aaa_p_hisfac_alc. Type of FECHA_EXPEDICION_FACTU %;
    Col_13 aaa_p_hisfac_alc. Type of FECHA_INICIO_PERIODO %;
    col_14 aaa_p_hisfac_alc. Type of DIAS_FACTURADOS %;
    col_15 aaa_p_hisfac_alc. Type of COD_CLASE_USO %;
    col_16 aaa_p_hisfac_alc. Type of UNID_MULTIUSUARIOS_RESIDENCIAL %;
    col_17 aaa_p_hisfac_alc. Type of UNID_MULTIUSARIO_NORESIDENCIAL %;
    col_18 aaa_p_hisfac_alc. Type of HOGAR_COMUNITARIO %;
    col_19 aaa_p_hisfac_alc. Type of USUA_FACTURADO_AFORO %;
    col_20 aaa_p_hisfac_alc. Type of USUA_CON_CARACTERIZACION %;
    col_21 aaa_p_hisfac_alc. Type of CARGO_FIJO %;
    col_22 aaa_p_hisfac_alc. Type of CARGO_VERTIMENTO_BASICO %;
    col_23 aaa_p_hisfac_alc. Type of CARGO_VERTIMENTO_COMPL %;
    col_24 aaa_p_hisfac_alc. Type of CARGO_VERTIMENTO_SUNTUARIO %;
    col_25 aaa_p_hisfac_alc. Type of CMT_COSTO_MEDIO_RETRIBUTIVA %;
    col_26 aaa_p_hisfac_alc. Type of VERTIMENTO_PERIODO_M3%;
    col_27 aaa_p_hisfac_alc. Type of VLR_FACTURADO_VERTIDO %;
    col_28 aaa_p_hisfac_alc. Type of VLR_SUBSIDIO %;
    col_29 aaa_p_hisfac_alc. Type of VLR_CONTRIBUCCION %;
    col_30 aaa_p_hisfac_alc. Type of FACTOR_SUBS_CONTR_CARGO_FIJO %;
    col_31 aaa_p_hisfac_alc. Type of FACTOR_SUBS_CONTR_VERTIMIENTO %;
    col_32 aaa_p_hisfac_alc. Type of CARGOS_CONEXION %;
    col_33 aaa_p_hisfac_alc. Type of PAGO_ANTICIPADO_SERVICIO %;
    col_34 aaa_p_hisfac_alc. Type of DIAS_MORA %;
    col_35 aaa_p_hisfac_alc. Type of VALOR_MORA %;
    col_36 aaa_p_hisfac_alc. Type of INTERESES_MORA %;
    col_37 aaa_p_hisfac_alc. Type of OTROS_COBROS %;
    col_38 aaa_p_hisfac_alc. Type of CAUSAL_REFACTURACION %;
    col_39 aaa_p_hisfac_alc. Type of NUM_FACTURA_REFACTURACION %;
    col_40 aaa_p_hisfac_alc. Type of VALOR_TOTAL_FACTURADO %;
    col_41 aaa_p_hisfac_alc. Type of PAGOS_PERIODO_FACTURADO %;

    Start
    V1: = Utl_File.Fopen ('PUBLIC_ACCESS', 'sui_facturacion_alcantarillado_15085_2011_01_76845_00A.csv', 'R', 32767);
    Cont_Filas: = 1;
    insert into a values (seq_aaa_p_archivos_leidos.nextval, 'sui_facturacion_alcantarillado_15085_2011_01_76845_00A.csv', sysdate, user) aaa_p_archivos_leidos;
    loop
    Begin

    UTL_FILE.get_line (v1, v2);
    -dbms_output.put_line ('El contenido're: ' | v2);

    -cuenta los characters...
    Select length (v2)
    in cont
    Double;
    dbms_output.put_line ('Total characters: ': suite);

    Select count (instr (v2, ','))
    in tot_comas
    Double;
    tot_comas: = 1;
    ACUM: = 1;
    Pos_1: = 0;
    While ACUM < = 41
    LOOP
    Select instr (V2, ',', 1, ACUM) PRUEBA
    IN POS_2
    FROM DUAL;
    dbms_output.put_line ('-> POSITION TOTAL 1' |) POS_1);
    dbms_output.put_line (' POSITION TOTAL 2-> ' |) POS_2);
    REST: = (POS_2-POS_1)-1;

    SUBSTR (,(POS_1+1), REST V2) SELECT PRUEBA2
    BY CADEN
    FROM DUAL;
    dbms_output.put_line (' CADENA SELECCIONADA-> ' |) CADEN);

    -Expressions, variable values of las Br...

    If Cont_Filas = 1 Then
    Dbms_Output.put_line (' no pasa nada...');
    On the other
    If acum = 1 then
    Col_1: = Caden;
    Elsif Acum = 2 Then
    Col_2: = Caden;
    Elsif Acum = 3 Then
    col_3: = CADEN;
    Elsif Acum = 4 Then
    col_4: = CADEN;
    Elsif Acum = 5 Then
    col_5: = CADEN;
    Elsif acum = 6 then
    col_6: = CADEN;
    Elsif acum = 7 then
    col_7: = CADEN;
    Elsif acum = 8 then
    col_8: = CADEN;
    Elsif Acum = 9 Then
    Col_9: = Caden;
    Elsif acum = 10 then
    Col_10: = Caden;
    Elsif acum = 11 then
    Col_11: = Caden;
    Elsif Acum = 12 Then
    Col_12: = Caden;
    Elsif Acum = 13 then
    Col_13: = Caden;
    Elsif Acum = 14 then
    Col_14: = Caden;
    Elsif Acum = 15 then
    col_15: = CADEN;
    Elsif Acum = 16 then
    Col_16: = Caden;
    Elsif acum = 17 then
    Col_17: = Caden;
    Elsif acum = 18 then
    Col_18: = Caden;
    Elsif Acum = 19 then
    Col_19: = Caden;
    Elsif Acum = 20 then
    Col_20: = Caden;
    Elsif acum = 21 then
    Col_21: = Caden;
    Elsif Acum = 22 then
    Col_22: = Caden;
    Elsif Acum = 23 then
    Col_23: = Caden;
    Elsif Acum = 24 then
    Col_24: = Caden;
    Elsif Acum = 25 then
    Col_25: = Caden;
    Elsif Acum = 26 then
    Col_26: = Caden;
    Elsif Acum = 27 then
    Col_27: = Caden;
    Elsif Acum = 28 then
    Col_28: = Caden;
    Elsif Acum = 29 then
    Col_29: = Caden;
    Elsif Acum = 30 then
    Col_30: = Caden;
    Elsif Acum = 31 then
    Col_31: = Caden;
    Elsif Acum = 32 then
    Col_32: = Caden;
    Elsif Acum = 33 then
    col_33: = CADEN;
    Elsif Acum = 34 then
    Col_34: = Caden;
    Elsif Acum = 35 then
    Col_35: = Caden;
    Elsif Acum = 36 then
    Col_36: = Caden;
    Elsif Acum = 37 then
    Col_37: = Caden;
    Elsif Acum = 38 then
    Col_38: = Caden;
    Elsif Acum = 39 then
    Col_39: = Caden;
    Elsif Acum = 40 then
    Col_40: = Caden;
    Elsif acum = 41 then
    Col_41: = Caden;
    -trae el Código del archivo...
    Select Id_Archivo
    In Cod_Archivo
    Of Aaa_P_Archivos_Leidos
    Where number = "sui_facturacion_alcantarillado_15085_2011_01_76845_00A.csv";

    -inserta fila acquired the playback...
    insert into aaa_p_hisfac_alc (ID_AAA_HISFAC, SUSCRIPTOR, NUM_CONTRATO, COD_DANE_DPTO, COD_DANE_MPIO, ZONA_IGAC, SECTOR_IGAC, MANZANA_VEREDA,
    NUM_PREDIO, CONDICION_PREDIO, DIRECCION_PREDIO, NUM_FACTURA, FECHA_EXPEDICION_FACTU, FECHA_INICIO_PERIODO, DIAS_FACTURADOS,
    COD_CLASE_USO, UNID_MULTIUSUARIOS_RESIDENCIAL, UNID_MULTIUSARIO_NORESIDENCIAL, HOGAR_COMUNITARIO, USUA_FACTURADO_AFORO, USUA_CON_CARACTERIZACION,
    CARGO_FIJO, CARGO_VERTIMENTO_BASICO, CARGO_VERTIMENTO_COMPL, CARGO_VERTIMENTO_SUNTUARIO, CMT_COSTO_MEDIO_RETRIBUTIVA, VERTIMENTO_PERIODO_M3,
    VLR_FACTURADO_VERTIDO, VLR_SUBSIDIO, VLR_CONTRIBUCCION, FACTOR_SUBS_CONTR_CARGO_FIJO, FACTOR_SUBS_CONTR_VERTIMIENTO, CARGOS_CONEXION, PAGO_ANTICIPADO_SERVICIO,
    Dias_Mora, Valor_Mora, Intereses_Mora, Otros_Cobros, Causal_Refacturacion, Num_Factura_Refacturacion, Valor_Total_Facturado, Pagos_Periodo_Facturado, Cod_Archivo)
    Values (Seq_Aaa_P_Hisfac_Alc.nextval, col_1, col_2, col_3, col_4, col_5, col_6, col_7, col_8, col_9, col_10, col_11, col_12, col_13, col_14,
    Col_15, Col_16, Col_17, Col_18, Col_19, Col_20, Col_21, Col_22, Col_23, Col_24, Col_25, Col_26, Col_27,
    col_28, col_29, col_30, col_31, col_32, col_33, col_34, col_35, col_36, col_37, col_38, col_39, col_40, col_41, Cod_Archivo);
    End If;
    end if;
    ACUM: = NOW + 1;
    Pos_1: = Pos_2;
    Tot_Comas: = Tot_Comas + 1;

    End loop;
    cont_filas: = cont_filas + 1;
    Dbms_Output.put_line (' contains United Nations total: ' |) Tot_Comas | «comas...» ») ;
    Dbms_Output.put_line (' contains United Nations total: ' | cont_filas |) "filas");

    exception
    When no_data_found then
    "exit";
    end;
    dbms_output.put_line ('-'); -LINEA SALTO
    dbms_output.put_line ('-'); -LINEA SALTO
    end loop;
    dbms_output.put_line ('-->'); -LINEA SALTO
    dbms_output.put_line ('-' | cont); -LINEA SALTO

    Dbms_Output.put_line (' the value of the columna es 2 ' | col_1);
    UTL_FILE.fclose (v1);
    exception
    while others then
    dbms_output.put_line (SQLERRM);
    end;
    /


    and permissions already due...

    I appreciate your attention and offered cooperation
    Reynel Salazar Martinez+.

    There are discussions here of the past showing how to upload a CSV (comma-delimited file) to an existing table... Here's an example blog which may help: http://oraexplorer.com/2007/11/apex-to-upload-text-file-and-write-into/

    Thank you

    Tony Miller
    Webster, TX

    Follow your passion; the rest will take care of itself.

    JMS

    If you answer this question, please mark the thread as closed and give points where won...

  • How do I restore procedure PL/SQL without rolling back content of medium level

    Hi all

    I called a PL/SQL, conditions procedure I want to roll back the changes made by PL/SQL procedure without touching the changes made at the level of the OS, is this possible? If so how.

    Please help it is urgent.


    Thanks and greetings
    MS

    Hello

    Thank you to use getTransaction () .executeCommand ("rollback") of your AM, it will solve your problem.

    If you want clarification on this please consult the JDev guide Chapter 5, implementing features server-side > Rollback methods.

    Kind regards
    Out Sharma

  • How to run a file through the command prompt window

    I try to download a zip called Kindle Gen - file instructions say I should first extract it to c:\KindleGen and then run it through the command prompt window by typing c:\KindleGen\kindlegen (I ' v it not compressed)

    The showsc:\Users\Barry prompt window > then I'v typed into it after the > but its not to recognize the path to the file.

    Wonder if anyone can advise this as i ' v hurts?

    Thanks Barry

    I try to download a zip called Kindle Gen - file instructions say I should first extract it to c:\KindleGen and then run it through the command prompt window by typing c:\KindleGen\kindlegen (I ' v it not compressed)

    The showsc:\Users\Barry prompt window > then I'v typed into it after the > but its not to recognize the path to the file.

    Wonder if anyone can advise this as i ' v hurts?

    Thanks Barry

    If you have used Windows Explorer (computer) to create the directory in question (C:\KindleGen\) and extract the files in this directory...

    Open a command prompt.

    Type:

    CD \KindleGen

    Type:

    DIR

    Run everything you are supposed to run by typing the name.

Maybe you are looking for