Dbms_output not working in procedure

Here is my procedure:
create or replace
PROCEDURE TD_TEST1 AS
begin
dbms_output.enable;
dbms_output.put_line('Hello oracle!');
exception
when others then
null;
END TD_TEST1;
It outputs the following when I run the procedure using the "play" button in SQL Developer.
Connecting to the database...
Hello oracle!
Process exited.
Disconnecting from the database...
But when I run the following code from another sql worksheet connected to the same db here what happens:
BEGIN
TD_TEST1();
END;
anonymous block completed
Why no Hello oracle! ?
SQL Plus does it!

In Oracle SQL Developer (v3.0.04) you may go to
View--> dbms Output
once that opens up, click on the Green + and select your connection.then your output for that connection will show up there as well (but NOT in your Script output -- that's where "set serverout on" will appear)

Similar Messages

  • Update query not working thru procedure

    Hi
    I need to update one table column based on another table column.
    thru sql statement it is working, but same statement is not working thru stored procedure.
    update target_table a set a.col2 = (select col2 from source_table b where a.id = b.id);
    Above statement is working thru sql statement ,but it is not working thru procedure.
    So Please on this.
    Regards,
    Venkat

    post the code for the procedure. Kindly use before and after the procedure statement!                                                                                                                                                                                       

  • Date type parameters do not work package procedure

    a cordial greeting to the whole community, in advance thank you very much for your precious time
    a general way I have the following, a package in which I have a main procedure which I recible three parameters: a start date, a final, and a number of client
    to use the dates I enter as parameter to query yields no records, but if I assign the date internally in the procedure, if it sheds records, the strange thing is that both the data and the parameters that are identical internally assigned even in its length and I checked, the truth and I stay out of ideas thank you very much for your time attaching the code
    for now I'm just using the second query forget the first
    ------call to procedure-----
    DECLARE
    errcode VARCHAR2(200);
    errbuf VARCHAR2(200);
    BEGIN
    xxxxx.pkg.xxxinitial_end(errcode  ,errbuf
                                                        ,'2013/08/19 00:00:00'
                                                        ,'2013/08/23 00:00:00','456456456546');
    END;
    -----------------------------------------------------------------procedure---------------------------------------------------------------------
    PROCEDURExxxinitial_end (ERRCODE OUT VARCHAR2
      , ERRBUFF OUT VARCHAR2
      , p_initial_date IN VARCHAR2
      , p_end_date IN VARCHAR2
      , customer IN VARCHAR2)IS
    l_encoding_line VARCHAR2(240);
    cur_without_customer SYS_REFCURSOR;
    cur_with_customer SYS_REFCURSOR;
      initial_date DATE;
      end_date DATE;
      initial_date2 DATE;
      end_date2 DATE;
    BEGIN
    l_encoding_line := '<?xml version="1.0" encoding=' || '"iso-8859-1"' ||
                       ' ?>' || chr(10) || '<XXOCS_TOTAL_VENTAS_SINEXP>';
      initial_date := to_date(p_initial_date, 'YYYY/MM/DD HH24:MI:SS');-----------------input parameters  NOT WORKING
      end_date := to_date(p_end_date, 'YYYY/MM/DD HH24:MI:SS');-------------------input parameters
      initial_date2:=to_date('2013/08/19 00:00:00', 'YYYY/MM/DD HH24:MI:SS');---------------------default values
      end_date2:=to_date('2013/08/23 00:00:00', 'YYYY/MM/DD HH24:MI:SS');---------------------default values        WORKING FINE
      IF customer IS NULL THEN
       -- OPEN cur_without_customer;
        DBMS_OUTPUT.PUT_LINE('se ejecuto el primero');
        -------------------------cursor  -----------------------------------
        OPEN cur_without_customer FOR
            SELECT rct.customer_trx_id
                  ,rctl.customer_trx_line_id
                  ,hp.party_name ---cliente
                  ,hca.account_number ----N° Cliente
                  ,rctl.line_number -----item
                  ,rctt.name---descripcion transaccion
                  ,rct.trx_number -----numero
                  ,rctt.type ------tipo de transaccion
                  ,hp.party_id--control solamente
                  ,rct.trx_date------Fecha de emisión Comprobante de Venta
                  ,rct.attribute1   ---No. de autorización del Comprobante de Venta
                  ,mp.attribute9||rct.trx_number N_Comprobante---No. de Comprobante de Venta
                  ,rct.attribute4-----Unidad Estratégica de Negocio
                  ,mp.attribute9----  N° de establecimiento
                  ,rctl.description-----Descripción (Tipo de Combustible)
                  ,rctl.quantity_invoiced---Cantidad Vendida en galones
                  ,rctl.unit_selling_price---Precio de venta unitario
                  --,rctl.taxable_amount-------Valor Base Imponible --restriccion
                  --,rctl.extended_amount---valor iva 12%
                 -- ,NVL(importe_12(rctl.customer_trx_line_id,rct.customer_trx_id),'N/A')
              FROM ra_customer_trx_all         rct,
                   ra_customer_trx_lines_all   rctl,
                   hz_cust_accounts            hca,
                   hz_parties                  hp,
                   ra_cust_trx_types_all       rctt,
                   mtl_parameters              mp
                  -- mtl_system_items_b          msi,
                 --  zx_lines                    zl
                   --ra_batch_sources_all  rbs
             WHERE
               --rct.trx_date BETWEEN initial_date  AND end_date --parametros de fecha
               rct.trx_date BETWEEN to_date('2013/08/19 00:00:00', 'YYYY/MM/DD HH24:MI:SS')/*initial_date*/ AND to_date('2013/08/23 00:00:00', 'YYYY/MM/DD HH24:MI:SS')/*end_date*/
               AND rct.sold_to_customer_id = hca.cust_account_id
               AND hca.party_id = hp.party_id
               AND rct.customer_trx_id=rctl.customer_trx_id
               --AND rctl.inventory_item_id=msi.inventory_item_id
               AND mp.organization_id=rctl.warehouse_id
               AND rct.cust_trx_type_id = rctt.cust_trx_type_id;
         print_output(fnd_file.output, l_encoding_line);
        get_xml(cur_without_customer, 'G_REGISTER', 'CABECERA', ERRCODE);                         
      IF ERRCODE = 1 THEN
        ERRBUFF := 'El reporte no arrojo datos para los parametros ingresados';
        ERRCODE := 2;
        RETURN;
      ELSIF ERRCODE = 2 THEN
        ERRBUFF := SQLERRM;
        RETURN;
      END IF;
      print_output(fnd_file.output, '</XXOCS_TOTAL_VENTAS_SINEXP>');
         ELSE
         --  OPEN cur_with_customer;
           DBMS_OUTPUT.PUT_LINE('se ejecuto el segundo');
           -----------------------cursor 2---------------------------
           DBMS_OUTPUT.PUT_LINE('customer ' || customer);
           DBMS_OUTPUT.PUT_LINE('ASI ESTAN ENTRANDO LOS PARAMETROS              '||length(p_initial_date));
           DBMS_OUTPUT.PUT_LINE('ASI ESTAN ENTRANDO LOS PARAMETROS              '||length(p_end_date));
           DBMS_OUTPUT.PUT_LINE('customer ' || customer);
           DBMS_OUTPUT.PUT_LINE('ASI ESTAN ENTRANDO LOS PARAMETROS   quemados   '|| length(initial_date2));
           DBMS_OUTPUT.PUT_LINE('ASI ESTAN ENTRANDO LOS PARAMETROS   quemados   '|| length(end_date2));
           DBMS_OUTPUT.PUT_LINE('customer ' || customer);
           DBMS_OUTPUT.PUT_LINE('ASI ESTAN ENTRANDO LOS PARAMETROS convertidso  '|| length(initial_date));
           DBMS_OUTPUT.PUT_LINE('ASI ESTAN ENTRANDO LOS PARAMETROS convertidos  '|| length(end_date));
           OPEN  cur_with_customer FOR
          SELECT     rct.customer_trx_id
                    ,rctl.customer_trx_line_id
                    ,hp.party_name ---cliente
                    ,hca.account_number ----N° Cliente
                    ,rctl.line_number-----item
                    ,rctt.name---descripcion transaccion
                    ,rct.trx_number -----numero
                    ,rctt.type ------tipo de transaccion
                    ,hp.party_id---control solamente
                    ,rct.trx_date------Fecha de emisión Comprobante de Venta
                    ,rct.attribute1   ---No. de autorización del Comprobante de Venta
                    ,mp.attribute9||rct.trx_number N_Comprobante--No. de Comprobante de Venta
                    ,rct.attribute4------ Unidad Estratégica de Negocio
                    ,mp.attribute9---------N° de establecimiento
                    ,rctl.description---------Descripción (Tipo de Combustible)
                    ,rctl.quantity_invoiced----Cantidad Vendida en galones
                    ,rctl.unit_selling_price ---Precio de venta unitario
                   -- ,rctl.taxable_amount-------Valor Base Imponible --restriccion
                   -- ,rctl.extended_amount---valor iva 12%
              -- ,NVL(importe_12(rctl.customer_trx_line_id,rct.customer_trx_id),'N/A')
                FROM ra_customer_trx_all           rct,
                     ra_customer_trx_lines_all     rctl,
                     hz_cust_accounts              hca,
                     hz_parties                    hp,
                     ra_cust_trx_types_all         rctt,
                     mtl_parameters                mp
                    -- mtl_system_items_b            msi,
                     --zx_lines                      zl
                 WHERE hca.account_number=customer
                  AND  hca.party_id=hp.party_id
                  AND  hca.cust_account_id=rct.sold_to_customer_id
                  AND  rct.customer_trx_id=rctl.customer_trx_id
                 -- AND  rctl.inventory_item_id=msi.inventory_item_id
                  AND  mp.organization_id=rctl.warehouse_id
                  AND  rct.cust_trx_type_id = rctt.cust_trx_type_id
                  AND rownum = 1
            AND rct.trx_date BETWEEN initial_date AND end_date;<------------when I assign these parameters( initial_date AND end_date  )--are the insert by parameter  initial_date2 AND end_date2 defualt
           DBMS_OUTPUT.PUT_LINE('customer ' || customer);
           DBMS_OUTPUT.PUT_LINE('fe inicial ' || initial_date);
           DBMS_OUTPUT.PUT_LINE('fe final ' ||end_date);
           print_output(fnd_file.output, l_encoding_line);
           get_xml(cur_with_customer, 'G_REGISTER', 'CABECERA', ERRCODE);                         
      IF ERRCODE = 1 THEN
        ERRBUFF := 'El reporte no arrojo datos para los parametros ingresados';
        ERRCODE := 2;
        RETURN;
      ELSIF ERRCODE = 2 THEN
        ERRBUFF := SQLERRM;
        RETURN;
      END IF;
      print_output(fnd_file.output, '</XXOCS_TOTAL_VENTAS_SINEXP>');
        END IF;
        EXCEPTION
      WHEN OTHERS THEN
        print_output(fnd_file.log, 'Error Ventas sin Exportaciones:' || SQLERRM);
        ERRCODE := 2;
        ERRBUFF := SQLERRM;
      -- Initialization
    END  xxxinitial_end;

    Welcome.  As a note, this question has nothing to do with PL/SQL XML programming and everything to do with SQL and PL/SQL
    That said, the simple test case I setup, because I don't have all your tables, works just fine.
    declare
       l_errcode  VARCHAR2(300);
       l_errbuff  VARCHAR2(300);
       PROCEDURE xxxinitial_end (ERRCODE OUT VARCHAR2
         , ERRBUFF OUT VARCHAR2
         , p_initial_date IN VARCHAR2  -- why not a date?
         , p_end_date IN VARCHAR2      -- why not a date?
         , customer IN VARCHAR2)
       IS
         initial_date DATE;
         end_date DATE;
         l_value  VARCHAR2(10);
       BEGIN
         initial_date := to_date(p_initial_date, 'YYYY/MM/DD HH24:MI:SS');
         end_date := to_date(p_end_date, 'YYYY/MM/DD HH24:MI:SS');
         -- Not trapping the No Data Found on purpose
         SELECT 'hit'
           INTO l_value
           FROM dual
          WHERE SYSDATE BETWEEN initial_date AND end_date;
       END  xxxinitial_end;
    begin
      -- Test statements here
      xxxinitial_end(l_errcode, l_errbuff
                     ,'2013/08/19 00:00:00'
                     ,'2013/10/19 00:00:00'
                     ,null);
    end;
    As a comment above says, if you are dealing with dates, why not use a DATE parameter in the procedure and avoid the conversion in your code.
    Also, you can simplify your code a bit by using a third sys_refcursor and setting one of the opened cursors to it.  This allows you to pull out the common logic following the OPEN and only have one copy of it.
    PROCEDURE xxxinitial_end (ERRCODE OUT VARCHAR2
      , ERRBUFF OUT VARCHAR2
      , p_initial_date IN VARCHAR2  -- why not a date?
      , p_end_date IN VARCHAR2      -- why not a date?
      , customer IN VARCHAR2)
    IS
      l_encoding_line VARCHAR2(240);
      cur_without_customer SYS_REFCURSOR;
      cur_with_customer SYS_REFCURSOR;
      cur_comm          SYS_REFCURSOR;
      initial_date DATE;
      end_date DATE;
    BEGIN
      l_encoding_line := '<?xml version="1.0" encoding=' || '"iso-8859-1"' ||
                         ' ?>' || chr(10) || '<XXOCS_TOTAL_VENTAS_SINEXP>';
      initial_date := to_date(p_initial_date, 'YYYY/MM/DD HH24:MI:SS');-----------------input parameters  NOT WORKING
      end_date := to_date(p_end_date, 'YYYY/MM/DD HH24:MI:SS');-------------------input parameters
      IF customer IS NULL THEN
        -------------------------cursor  -----------------------------------
        OPEN cur_without_customer FOR
            SELECT rct.customer_trx_id
                  ,rctl.customer_trx_line_id
                  ,hp.party_name ---cliente
                  ,hca.account_number ----N° Cliente
                  ,rctl.line_number -----item
                  ,rctt.name---descripcion transaccion
                  ,rct.trx_number -----numero
                  ,rctt.type ------tipo de transaccion
                  ,hp.party_id--control solamente
                  ,rct.trx_date------Fecha de emisión Comprobante de Venta
                  ,rct.attribute1   ---No. de autorización del Comprobante de Venta
                  ,mp.attribute9||rct.trx_number N_Comprobante---No. de Comprobante de Venta
                  ,rct.attribute4-----Unidad Estratégica de Negocio
                  ,mp.attribute9----  N° de establecimiento
                  ,rctl.description-----Descripción (Tipo de Combustible)
                  ,rctl.quantity_invoiced---Cantidad Vendida en galones
                  ,rctl.unit_selling_price---Precio de venta unitario
                  --,rctl.taxable_amount-------Valor Base Imponible --restriccion
                  --,rctl.extended_amount---valor iva 12%
                 -- ,NVL(importe_12(rctl.customer_trx_line_id,rct.customer_trx_id),'N/A')
              FROM ra_customer_trx_all         rct,
                   ra_customer_trx_lines_all   rctl,
                   hz_cust_accounts            hca,
                   hz_parties                  hp,
                   ra_cust_trx_types_all       rctt,
                   mtl_parameters              mp
                  -- mtl_system_items_b          msi,
                 --  zx_lines                    zl
                   --ra_batch_sources_all  rbs
             WHERE
               --rct.trx_date BETWEEN initial_date  AND end_date --parametros de fecha
               rct.trx_date BETWEEN to_date('2013/08/19 00:00:00', 'YYYY/MM/DD HH24:MI:SS')/*initial_date*/ AND to_date('2013/08/23 00:00:00', 'YYYY/MM/DD HH24:MI:SS')/*end_date*/
               AND rct.sold_to_customer_id = hca.cust_account_id
               AND hca.party_id = hp.party_id
               AND rct.customer_trx_id=rctl.customer_trx_id
               --AND rctl.inventory_item_id=msi.inventory_item_id
               AND mp.organization_id=rctl.warehouse_id
               AND rct.cust_trx_type_id = rctt.cust_trx_type_id;
           cur_comm := cur_without_customer;
         ELSE
           -----------------------cursor 2---------------------------
           OPEN  cur_with_customer FOR
          SELECT     rct.customer_trx_id
                    ,rctl.customer_trx_line_id
                    ,hp.party_name ---cliente
                    ,hca.account_number ----N° Cliente
                    ,rctl.line_number-----item
                    ,rctt.name---descripcion transaccion
                    ,rct.trx_number -----numero
                    ,rctt.type ------tipo de transaccion
                    ,hp.party_id---control solamente
                    ,rct.trx_date------Fecha de emisión Comprobante de Venta
                    ,rct.attribute1   ---No. de autorización del Comprobante de Venta
                    ,mp.attribute9||rct.trx_number N_Comprobante--No. de Comprobante de Venta
                    ,rct.attribute4------ Unidad Estratégica de Negocio
                    ,mp.attribute9---------N° de establecimiento
                    ,rctl.description---------Descripción (Tipo de Combustible)
                    ,rctl.quantity_invoiced----Cantidad Vendida en galones
                    ,rctl.unit_selling_price ---Precio de venta unitario
                   -- ,rctl.taxable_amount-------Valor Base Imponible --restriccion
                   -- ,rctl.extended_amount---valor iva 12%
              -- ,NVL(importe_12(rctl.customer_trx_line_id,rct.customer_trx_id),'N/A')
                FROM ra_customer_trx_all           rct,
                     ra_customer_trx_lines_all     rctl,
                     hz_cust_accounts              hca,
                     hz_parties                    hp,
                     ra_cust_trx_types_all         rctt,
                     mtl_parameters                mp
                    -- mtl_system_items_b            msi,
                     --zx_lines                      zl
                 WHERE hca.account_number=customer
                  AND  hca.party_id=hp.party_id
                  AND  hca.cust_account_id=rct.sold_to_customer_id
                  AND  rct.customer_trx_id=rctl.customer_trx_id
                 -- AND  rctl.inventory_item_id=msi.inventory_item_id
                  AND  mp.organization_id=rctl.warehouse_id
                  AND  rct.cust_trx_type_id = rctt.cust_trx_type_id
                  AND rownum = 1
            AND rct.trx_date BETWEEN initial_date AND end_date;<------------when I assign these parameters( initial_date AND end_date  )--are the insert by parameter  initial_date2 AND end_date2 defualt
         cur_comm := cur_with_customer;
      END IF;
      print_output(fnd_file.output, l_encoding_line);
      get_xml(cur_comm, 'G_REGISTER', 'CABECERA', ERRCODE);
      CLOSE cur_comm;
      IF ERRCODE = 1 THEN
        ERRBUFF := 'El reporte no arrojo datos para los parametros ingresados';
        ERRCODE := 2;
        RETURN;
      ELSIF ERRCODE = 2 THEN
        ERRBUFF := SQLERRM;
        RETURN;
      END IF;
    EXCEPTION
      WHEN OTHERS THEN
        print_output(fnd_file.log, 'Error Ventas sin Exportaciones:' || SQLERRM);
        ERRCODE := 2;
        ERRBUFF := SQLERRM;
      -- Initialization
    END  xxxinitial_end;

  • Cursor Not working stored Procedure but it working in anonymous Procedure

    Hi Gurus....
    My problem looks different.....my code was working as anonymous block where as it was not working as stored Procedure
    Declare
    cursor c_tblspace is
    select fs.tablespace_name TBL_SPC_NAME
           , round((100 *((sum(fs.bytes)) / df.bytes)), 2) PCT_Free 
             from sys.dba_data_files df
           , sys.dba_free_space fs
            ,partition_tables ms
         where df.file_id(+) = fs.file_id
         and fs.tablespace_name =ms.tbspc_nam
         group by fs.file_id, df.bytes, fs.tablespace_name;
    begin
      for rec_tblspace in c_tblspace
           loop
            if ( rec_tblspace.PCT_Free > 5 )
             then
             insert into t_space (tbspc_nm,ftr_spc)
             values(rec_tblspace.TBL_SPC_NAME,'full');
             dbms_output.put_line(rec_tblspace.TBL_SPC_NAME||' is full');
             end if;
           end loop;
    end;where as it working while i want to create a stored Procedure...
    create or replace procedure p_upd_space is
    cursor c_tblspace is
    select fs.tablespace_name TBL_SPC_NAME
           , round((100 *((sum(fs.bytes)) / df.bytes)), 2) PCT_Free 
             from sys.dba_data_files df
           , sys.dba_free_space fs
            ,partition_tables ms
         where df.file_id(+) = fs.file_id
         and fs.tablespace_name =ms.tbspc_nam
         group by fs.file_id, df.bytes, fs.tablespace_name;
    begin
      for rec_tblspace in c_tblspace
           loop
             if ( rec_tblspace.PCT_Free > 5 )
             then
             insert into t_space (tbspc_nm,ftr_spc)
             values(rec_tblspace.TBL_SPC_NAME,'full');
             dbms_output.put_line(rec_tblspace.TBL_SPC_NAME||' is full');
             end if;
           end loop;
    end;It was throwing following error...
    PL/SQL: ORA-00942: table or view does not exist

    Justin is right. You are creating definer right stored procedure.
    Roles are disabled during definer rights stored procedure compilation and execution.
    Here is the test case:
    #1. Anonymous Procedure
    HRDEMO@fmw//scripts> conn / as sysdba
    SYS@fmw//scripts> create user todd identified by oracle;
    SYS@fmw//scripts> grant dba to todd; --DBA role granted
    SYS@fmw//scripts> conn todd/oracle
    TODD@fmw//scripts> declare
    2 cursor c is select * from dba_data_files;
    3 begin
    4 null;
    5 end;
    6 /
    PL/SQL procedure successfully completed.
    #2. Stored Procedure
    TODD@fmw//scripts> create or replace procedure p1
    2 is
    3 cursor c is select * from dba_data_files;
    4 begin
    5 null;
    6 end;
    7 /
    Warning: Procedure created with compilation errors.
    TODD@fmw//scripts> show error
    3/27
    PL/SQL: ORA-00942: table or view does not exist

  • NVL function is not working is Procedural Parameter's

    Following is the Oracle Forms9i Program Unit. It's not working on Forms 9i though it's working on Forms6i. Please advise some solution, if anyone have experienced same kind of problem.
    PROCEDURE test ( as_case_id VARCHAR2) IS
    BEGIN
    INSERT INTO tab1 ( col1 )
    VALUES ( nvl(as_case_id, ' '));
    END;
    but this way it works fine
    PROCEDURE test ( as_case_id VARCHAR2) IS
    BEGIN
    INSERT INTO tab1 ( col1 )
    VALUES ( as_case_id );
    END;
    My forms9i runtime web session hangs and after sometime it becomes out oracle connection. It happens all the time.
    Thanks,

    did you check the data directly in the database for the ' '(space) or in the form. The field might not show you anything in the form if it's a space.
    Here is a simple test case:
    I have a db table with one column populated with space ' '.
    I have a form with one block with three fields based on that db table. The first field FIELD1 is for db field which holds the space, the 2nd is a db field which is length(FIELD1), and the 3rd field is a calculation field with formula nvl(length(:FIELD1),0). Then i query the block. What i see is the 1st column shows no space, the 2nd column is 1 and the 3rd column is 0. So i guess the form automaticly trim the field before displaying it in the screen.
    I am using Forms 6i.

  • Count into variable not working in procedure

    I'm writing a simple procedure in a package. Based on Record count I'm inserting record into other table.
    count(fielname) alwways returns zero. But the same SQL statement works fine when I just execute sql statement out side of procedure in SQL window.
    supplierid, userid fields are varchar(20)
    L_CNTSUPP NUMBER;
    SELECT count(SUPPLIERID)
    INTO L_CNTSUPP
    FROM TBLSEQUENCE TS, TBLUSER TU
    WHERE ltrim(rtrim(TS.SUPPLIERID)) = ltrim(rtrim(TU.INFO_1))
    AND ltrim(rtrim(TU.USERID)) = ltrim(rtrim(L_USERID));
    DBMS_OUTPUT.put_line(L_CNTSUPP);
    Please advice.

    Hello,
    Try this:
    SELECT count(*)
    INTO L_CNTSUPP
    FROM TBLSEQUENCE TS, TBLUSER TU
    WHERE ltrim(TS.SUPPLIERID) = ltrim(TU.INFO_1)
    AND ltrim(TU.USERID) = ltrim(L_USERID);
    DBMS_OUTPUT.put_line(L_CNTSUPP);A few points: you do not need an RTRIM when using VARCHAR since it's automatically RTRIMmed, but you should be using VARCHAR2 in Oracle - VARCHAR is for Oracle's own internal use and may change without notice. You only need LTRIM if you've spaces to the left of the data.

  • TRUNCATE TABLE  does not work in procedure

    Hi Friends,
    I create a procedure that have a command TRUNCATE TABLE errdbg;
    It use to record data processing information. It iworks in SQLPLUS by manually.
    I put it in procedure and get message as
    Warning: Package Body created with compilation errors.
    SQL> show error;
    Errors for PACKAGE BODY DATALOAD:
    LINE/COL ERROR
    172/10 PLS-00103: Encountered the symbol "TABLE" when expecting one of
    the following:
    := . ( @ % ;
    The symbol ":= was inserted before "TABLE" to continue.
    How to use TRUNCATE command in procedure?
    I can use delete. but it is not good for table space resused based on book.
    Thanks
    JIm

    You can't use DDL in pl/sql unless you use it with execute immediate
    e.g.,
    execute immediate 'truncate table errdbg' ;

  • Oracle 10.1.0.4.2 SQL Plus dbms_output.put_line not working

    I am using Oracle 10.1.0.4.2 SQL Plus, and dbms_output.put_line is not working. It returns the dbms_output ONLY from outside the procedure. I have dbms_output INSIDE my procedure, and none of it gets returned. Please help!
    Here is what I enter:
    set serveroutput on size 1000000;
    DECLARE
         x number:=0;
    begin
    DBMS_OUTPUT.ENABLE;
    c2reports.c2proc(x,'TEST');
    DBMS_OUTPUT.PUT_LINE('testX');
    END;
    testX
    There should be more besides the 'testX' that gets returned. The first line in my procedure has output code to print testY. Thanks in advance!

    This is the forum for the Oracle's SQL Developer (Not for general SQL/PLSQL questions). You should ask question like this in the PL/SQL forum

  • Xml parser procedur which worked in oracle 8.1.7 not working in oracle 9ir2

    hi all,
    THE BELOW PROCEDURE TO PARSE A XML WEB PAGE AND RETRIEVE THE DATA INTO TABLE IS WORKING WELL IN ORACLE 8.1.7 , BUT WHEN WE UPGRADED TO oRACLE 9I RELEASE 2 ,,ITS NOT WORKING AND GIVING THESE ERRORS,,
    13:44:56 Error: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
    ORA-06512: at "SYS.XMLNODECOVER", line 0
    ORA-06512: at "SYS.XSLPROCESSOR", line 500
    ORA-06512: at "XXCNA.XRATESDLOAD", line 37
    ORA-06512: at line 2
    CAN ANYONE GIVE A TIP?
    REGARDS,
    VIJAY
    CREATE OR REPLACE PACKAGE BODY XRATESDLOAD AS
    PROCEDURE XRATESDLOADP
    IS
    --DECLARE THE REQUIRED XML PARSER, DOM DOCUMENT,NODES AND NODELLISTS
    v_parser xmlparser.Parser;
    v_doc xmldom.DOMDocument;
    v_nl xmldom.DOMNodeList;
    v_n xmldom.DOMNode;
    --CREATE A PL/SQL TYPE TABLE
    TYPE tab_type IS TABLE OF CNA_XRATES_TEXT%ROWTYPE;
         t_tab tab_type := tab_type();
    BEGIN
    -- Create a parser.
    v_parser := xmlparser.newParser;
    -- Parse the document and create a new DOM document.
    xmlparser.parse(v_parser, 'http://www.xe.com/dfs/datafeed2.cgi?cnaeuropeholdingsltd');
    v_doc := xmlparser.getDocument(v_parser);
    -- Free resources associated with the Parser now it is no longer needed.
    xmlparser.freeParser(v_parser);
    -- Get a list of all the CURRENCY nodes in the document using the XPATH syntax.
    v_nl := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/xe-datafeed/currency');
    dbms_output.put_line( 'Currency rates processed on '||to_char(sysdate));
    --DELETE THE RECORDS IN THE CNA_XRATES_TEXT
    delete from CNA_XRATES_TEXT;
    dbms_output.put_line( 'Previous records of CNA_XRATES_TEXT table deleted '||to_char(sysdate));
    -- Loop through the list and create a new record in a tble collection
    -- for each CURRENCY record.
    FOR cur_emp IN 0 .. xmldom.getLength(v_nl) - 1 LOOP
    v_n := xmldom.item(v_nl, cur_emp);
    t_tab.extend;
    -- Use XPATH syntax to assign values to he elements of the collection.
    t_tab(t_tab.last).CURRENCY_SYMBOL := xslprocessor.valueOf(v_n,'csymbol');
    --t_tab(t_tab.last).CURRENCY_NAME     := xslprocessor.valueOf(v_n,'cname');
    t_tab(t_tab.last).CURRENCY_RATE := xslprocessor.valueOf(v_n,'crate');
         --t_tab(t_tab.last).CURRENCY_DATE       := xslprocessor.valueOf(v_n, sysdate);
    END LOOP;
    -- Insert data into the real CNA_XRATES_TEXT table from the table collection.
    -- Form better performance multiple collections should be used to allow
    -- bulk binding using the FORALL construct but this would make the code
    -- too long-winded for this example.
    FOR cur_emp IN t_tab.first .. t_tab.last LOOP
    INSERT INTO CNA_XRATES_TEXT
    (CURRENCY_SYMBOL,
    CURRENCY_RATE,
         CURRENCY_DATE)
    VALUES
    (t_tab(cur_emp).CURRENCY_SYMBOL,
    t_tab(cur_emp).CURRENCY_RATE,
         to_char(sysdate));
    END LOOP;
    dbms_output.put_line( 'Currency rates inserted into CNA_XRATES_TEXT table on '||to_char(sysdate));
    COMMIT;
    -- Free any resources associated with the document now it
    -- is no longer needed.
    xmldom.freeDocument(v_doc);
    END XRATESDLOADP;
    END XRATESDLOAD;
    /

    Unlike Oracle 7.x, versions 8 and above now internalize the trigger you are looking for within the database itself. So you can no longer have the kind of control over this process as you would have done previously, however the performance has increased according to Oracle.
    It is possible to remove these triggers in an emergency as follows:
    -- if tab$.trigflag != 0 - then Oracle internal replication triggers are enabled
    select * from tab$ where trigflag != 0;
    -- to remove Oracle internal replication triggers if replication is not working
    -- and needs to be removed in an emergency to allow writing to the tables
    -- also do this as sys user
    run catrepr
    -- also do this as sys user
    update tab$ set trigflag=0 where trigflag !=0;
    commit;
    shutdown immediate;
    startup
    However this removes all of the triggers - which is not what you want to do in your situation.
    You may find some additional helpful commands in the repdoc.txt file on my website:
    http://www.dotcomsolutionsinc.net/products/repgen/repgen_example_repdoc1.html
    And here is a list of replication setup scripts which could be helpful as well:
    http://www.dotcomsolutionsinc.net/products/repgen/repgen_files.html
    What is expecially important (as I am sure you know) is the setup of conflict resolution, which I do a little bit differently than I have seen documented elsewhere in order to avoid ORA-1403 errors.
    David Simpson
    www.dotcomsolutionsinc.net
    (Oracle Replication Consulting & Tools)

  • ODI Procedures not working after upgrading from 10G to 11G

    Hello Gurus,
    We have run into a scenario where the procedures in ODI are not working after we upgraded it from 10G to 11G (11.1.1.6). However we can make it to run if we create the procedure from scratch.
    Also we are having issues related to packages where in the packages were running before we applied the patch 11.1.1.6.3. And after applying the patches they are not running.
    Any help will be appreciated.
    Thanks

    If you want someone to help you, please be elaborate in the exact errors you are getting.
    A general statement would do nothing but guess work.
    What is the error that you get while executing the procedure.
    What are the exact issues that you get while executing packages ?

  • Sorting for the procedure is not working

    can you help why the sorting is not working here.I am running the below procedure to sort asc and desc and when I do sort in descending order by a different column it gives me a different rows sorted in desc order. what i
    want the proecdure to do it to sort the recordset in asc and desc order without changing the selected rows
    SQL>  exec trnsportitems.gettrnsportitems(1,10,'itemnumber desc', :n, :c);
    PL/SQL procedure successfully completed.
    SQL> print c;
    ITEMNUMBER              R IDESCR                                   IDESCRL                                                      IUNI IS I ITEM
    2011.601/00002          1 TUNNEL CONSTRUCTION LAYOUT STAKING       TUNNEL CONSTRUCTION LAYOUT STAKING                           LS   0
    2011.601/00003          2 CONSTRUCTION SURVEYING                   CONSTRUCTION SURVEYING                                       LS   05 N 2011601/00003
    2011.601/00010          3 VIBRATION MONITORING                     VIBRATION MONITORING                                         LS   05 N 2011601/00010
    2011.601/00020          4 REVISED BRIDGE PLANS                     REVISED BRIDGE PLANS                                         LS   05 N 2011601/00020
    2011.601/00040          5 DESIGN                                   DESIGN                                                       LS   05 N 2011601/00040
    2011.601/00050          6 DESIGN AND CONSTRUCT                     DESIGN AND CONSTRUCT                                         LS   05 N 2011601/00050
    2011.601/08010          7 SUPPLEMENTAL DESCRIPTION                 SUPPLEMENTAL DESCRIPTION                                     LS   05 N 2011601/08010
    2011.601/08011          8 SUPPLEMENTAL DESCRIPTION                 SUPPLEMENTAL DESCRIPTION                                     LS   05 N 2011601/08011
    2011.601/08012          9 SUPPLEMENTAL DESCRIPTION                 SUPPLEMENTAL DESCRIPTION                                     LS   05 N 2011601/08012
    2011.601/08013         10 SUPPLEMENTAL DESCRIPTION                 SUPPLEMENTAL DESCRIPTION                                     LS   05 N 2011601
    10 rows selected.
    SQL>
    SQL>  exec trnsportitems.gettrnsportitems(1,10,'idescr DESC', :n, :c);
    PL/SQL procedure successfully completed.
    SQL> print c;
    ITEMNUMBER              R IDESCR                                   IDESCRL                                                      IUNI IS I ITEM
    2563.613/00040          1 YELLOW TUBE DELINEATORS                  YELLOW TUBE DELINEATORS                                      UDAY 05 N 2563613/00040
    2563.602/00100          2 YELLOW TUBE DELINEATOR                   YELLOW TUBE DELINEATOR                                       EACH 05 N 2563602/00100
    2565.602/00940          3 YELLOW LED INDICATION                    YELLOW LED INDICATION                                        EACH 05 N 2565602/00940
    2502.602/00040          4 YARD DRAIN                               YARD DRAIN                                                   EACH 05 N 2502602/00040
    2411.601/00030          5 WYE STRUCTURE                            WYE STRUCTURE                                                LS   05 N 2411601/00030
    2557.603/00041          6 WOVEN WIRE FENCE                         WOVEN WIRE FENCE                                             L F  05 N 2557603/00041
    2557.603/00043          7 WOVEN WIRE                               WOVEN WIRE                                                   L F  05 N 2557603/00043
    2563.613/00615          8 WORK ZONE SPEED LIMIT SIGN               WORK ZONE SPEED LIMIT SIGN                                   UDAY 05 N 2563613/00
    2563.613/00610          9 WORK ZONE SPEED LIMIT                    WORK ZONE SPEED LIMIT                                        UDAY 05 N 2563613/00610
    2557.603/00035         10 WOODEN FENCE                             WOODEN FENCE                                                 L F  05 N 2557603/00035
    10 rows selected.

    Hi,
    user13258760 wrote:
    can you help why the sorting is not working here.I am running the below procedure to sort asc and desc and when I do sort in descending order by a different column it gives me a different rows sorted in desc order. what i
    want the proecdure to do it to sort the recordset in asc and desc order without changing the selected rowsAs it is written now, the argument insortexp has nothing to do with the order of the rows. It is used only in computing column r, and column r is used only in the WHERE clause.
    Are you really saying you don't want a WHERE clause at all in the main query: that you always want the cursor to contain all rows from itemlist that meet the 3 hard-coded conditions:
    ...                     WHERE item  '2999509/00001'     -- Did you mean != here?
                              AND iobselet = 'N'
                              AND ispecyr = '05'?
    If so, change the main query WHERE clause:
    WHERE r BETWEEN instartrowindex AND inendrowindexinto an ORDER BY clause:
    ORDER BY  rBy the way, you might want to make insortexp case-insensitive.
    In your example, you're calling the procedure with all small letters in insortexp:
    user13258760 wrote:
    SQL> exec trnsportitems.gettrnsportitems(1,10,'itemnumber desc', :n, :c);but the output is coming in ASC ending order:
    ...                           ORDER BY
                                     DECODE (insortexp, 'itemnumber ASC', item) ASC,
                                     DECODE (insortexp, 'itemnumber DESC', item) DESC,     -- capital 'DESC' won't match small 'desc'
                                     DECODE (insortexp, 'idescr ASC', idescr) ASC,
                                     DECODE (insortexp, 'idescr DESC', idescr) DESC,
                                     DECODE (insortexp, 'idescrl ASC', idescrl) ASC,
                                     DECODE (insortexp, 'idescrl DESC', idescrl) DESC,
                                     DECODE (insortexp, 'iunits ASC', iunits) ASC,
                                     DECODE (insortexp, 'iunits DESC', iunits) DESC,
                                     DECODE (insortexp, 'ispecyr ASC', ispecyr) ASC,
                                     DECODE (insortexp, 'ispecyr DESC', ispecyr) DESc,
                                   SUBSTR (item, 1, 4) || '.' || SUBSTR (item, 5)          -- This is the only non-NULL ORDER BY expression     Why not declare a local variable:
    sortexp      VARCHAR2 (20) := LOWER (insortexp);and use that variable instead of the raw argument in the query:
    ...                              DECODE (sortexp, 'itemnumber asc',  item) ASC,
                                     DECODE (sortexp, 'itemnumber desc', item) DESC, ...Also, this site doesn't like to display the &lt;&gt; operator, even inside \ tags.  When posting here, always use the other inequality operator, !=
    Edited by: Frank Kulash on Jun 15, 2010 3:25 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Why Dynamic Parameter is not working, when i create report using stored procedure ?

    Post Author: Shashi Kant
    CA Forum: General
    Hi all
    Why Dynamic Parameter is not working, when i create report XI using stored procedure ?
    Only i shaw those parameters which i used in my stored procedure, the parameter which i create dynamic using stored procedure
    is not shown to me when i referesh the report for viewing the results.
    I have used the same procedure which i mention below but can not seen the last screen which is shown in this .
    ============================================================================================
    1. Select View > Field Explorer2. Right-click on Parameter Fields and select New from the right-click menu.3. Enter u201CCustomer Nameu201D as the name for your parameter4. Under u201CList of Valuesu201D select u201CDynamicu201D5. Under the Value column, click where is says u201Cclick here to add itemu201D and select Customer Name from the drop-down list. The dialog shown now look like the one shown below in Figure 1. Click OK to return to your report design.
    Dynamic Parameter Setup6. Next, select Report > Select Expert, select the Customer Name field and click OK.7. Using the drop-down list beside select u201CIs Equal Tou201D and using the drop-down list, select your parameter field (it should be the first field). 8. Click OK to return to your report design and see the parameter dialog.The parameter dialog will appear and show you a dynamic list of values that is updated each time your run your report. It couldnu2019t be easier! In our next tutorial, we will be looking at how to use this feature to create cascading parameter fields, where the values are filtered by the preceding selection.
    Dynamic Parameters in Action
    My question is that whether dynamic parameter is working with storedprocedure or not.
    When i added one table and try to fetch records using dyanmic prameters. after that i am not be able to find the dynamic parameter option when i referesh my report.
    One more thing when i try the static parameter for my report, the option i see when i referesh the screen.
    Please reply soon , it's urgent
    Regards
    shashi kant

    Hi Kishore,
    I have tested the issue step by step by following you description, while the first issue works well in my local environment. Based on my research, this can be caused by the lookup expression or it indeed return Male value based on the logic. If you use the
    expression below, it will indeed only return the Male record. So please try to double-check the record in the two datasets and the expression in your environment:
    =lookup(first(Fields!ProgramID.Value,"DataSet1"),Fields!ProgramID.Value,Fields!Gender.Value,"DataSet2")
    As to the second issue, please try to use the following expression:
    =Count(Lookup(fields!ProgramID.value,fields!ProgramID.value,fields!Gender.value,"DataSet2"))
    Besides, if this issue still exist, in order to trouble shoot this issue more efficiently, could you please post both the .rdl  file with all the size properties to us by the following E-mail address?  It is benefit for us to do further analysis.
    E-mail: [email protected]
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • IN operator is not working correctly while calling,although pl/sql procedur

    CREATE or REPLACE PROCEDURE TEST(
    idListCommaSeparated IN VARCHAR2
    AS
    CURSOR c_emp IS SELECT first_name,last_name,start_date From Employee where id IN(idListCommaSeparated);
    r_emp c_emp%ROWTYPE;
    begin
    insert into temp1 values('B',sysdate,sysdate,'A');
          open c_emp;
          loop
              fetch c_emp into r_emp;
              exit when c_emp%NOTFOUND;
              insert into temp1 values(r_emp.first_name,sysdate,sysdate,'A');
                 --business Logic
      end loop;
          close c_emp;
    end;
    /idListCommaSeparated contains values like (2,3,4). while executing this procedure on sqlplus it is succefully created.
    When i run the query separately on sqlplus
    SELECT first_name,last_name,start_date From Employee where id IN(2,3,4)I got some rows in result.
    why i am not getting via procedure correct result.
    and one more thing the number of elements in 'idListCommaSeparated' values are not fixed,sometimes it may be(2,3,4) or sometimes variable value may (2,3,5,6).
    I am not able to understand,where i am going wrong?

    see whether you find nested table parameter implantation option useful. Also supported by .net/java in case that's your calling appln.
    Below is plsql block having a procedure with input paramater of empid's. It returns a cursor( empno and ename) as out parameter.
    The empid's are hardcoded in the calling block.
    SQL> create type t_id is table of number
      2  /
    Type created.
    SQL> set serveroutput on
    SQL> declare
      2
      3   v_tid t_id;
      4   v_results sys_refcursor;
      5
      6   v_employee_id number;
      7   v_name varchar2(100);
      8
      9   procedure TEST (p_tid in t_id, p_empcursor out sys_refcursor)  as
    10   begin
    11    open p_empcursor for
    12    select empno, ename from scott.emp
    13    where empno in (select column_value from table (p_tid));
    14
    15   end;
    16
    17
    18  begin
    19   v_tid := t_id(7902,7934);
    20
    21   TEST(v_tid,v_results);
    22
    23   IF v_results IS NOT NULL
    24     THEN
    25        LOOP
    26           FETCH v_results
    27            INTO v_employee_id, v_name;
    28
    29           EXIT WHEN (v_results%NOTFOUND);
    30           dbms_output.put_line(v_name);
    31        END LOOP;
    32
    33        IF v_results%ISOPEN
    34        THEN
    35           CLOSE v_results;
    36        END IF;
    37    END IF;
    38
    39  end;
    40  /
    *FORD*
    *MILLER*
    PL/SQL procedure successfully completed.
    SQL>

  • JDBC stored procedure not working in Weblogic 12.1.3

    Hi,
    We are migrating from WLS 12.1.2 to 12.1.3.
    We have a JDBC stored procedure which used to work correctly under 12.1.2. I understand that 12.1.2 uses ojdbc5/ojdbc6 jars (11.2.0.x). After migrating to 12.1.3, the stored procedure is not working.
    We have narrowed it down to the different between 12.1.2 using ojdbc5/6 and 12.1.3 using ojdbc7 jars, though we do not understand what the difference here is.
    Connection connection = getConnection();
    CallableStatement callableStatement = connection.prepareCall("{call RECEIPT_LOG (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}");
    callableStatement.registerOutParameter("PIO_RECEIPT_LOG_ID", java.sql.Types.INTEGER);
    callableStatement.setLong("PIO_RECEIPT_LOG_ID", 0);
    callableStatement.setString("PIO_DRAWER_NAME", request.getDrawerName());
    callableStatement.setString("PIO_DRAWER_FIRST_NAME", request.getDrawerFirstName());
    callableStatement.setString("PIO_DRAWER_OTHER_NAMES", "");
    callableStatement.setString("PIO_DRAWER_STREET_NO", "");
    callableStatement.setString("PIO_DRAWER_STREET", "");
    callableStatement.setString("PIO_DRAWER_LOCALITY", "");
    callableStatement.setLong("PIO_DRAWER_POSTCODE", 0);
    callableStatement.setString("PI_PAYMENT_TYPE", request.getPiPaymentType());
    callableStatement.setLong("PI_APPLICATION_ID", request.getApplicationId());
    callableStatement.setString("PI_PRIMARY_ID", request.getPiPrimaryId());
    callableStatement.setString("PI_SECONDARY_ID", request.getPiSecondaryId());
    callableStatement.setDouble("PI_AMOUNT", request.getPiAmount());
    callableStatement.setInt("PI_TAX_AMOUNT", 0);
    callableStatement.setNull("PI_VPC_TXNRESPONSECODE", java.sql.Types.VARCHAR);
    callableStatement.setInt("PI_VPC_TRANSACTIONNO", 0);
    callableStatement.setString("PI_VPC_MESSAGE", "");
    callableStatement.setString("PI_VPC_ACQRESPONSECODE", "");
    callableStatement.setString("PI_VPC_RECEIPTNO", "");
    callableStatement.setString("PI_VPC_BATCHNO", "");
    callableStatement.setString("PI_VPC_CARD", "");
    callableStatement.setString("PI_VPC_MERCHTXNREF", "");
    callableStatement.setString("PI_VPC_MERCHANT", "");
    callableStatement.setString("PI_VPC_ORDERINFO", "");
    callableStatement.setInt("PI_VPC_AMOUNT", 0);
    callableStatement.setString("PI_VPC_AUTHORIZEID", "");
    callableStatement.registerOutParameter("PO_RECEIPT_NO", java.sql.Types.VARCHAR);
    callableStatement.registerOutParameter("PO_SOURCE_ID", java.sql.Types.INTEGER);
    callableStatement.registerOutParameter("PO_PAYMENT_METHOD_TEXT", java.sql.Types.VARCHAR);
    callableStatement.registerOutParameter("PO_CREATE_COMMENT", java.sql.Types.VARCHAR);
    callableStatement.registerOutParameter("PO_ERROR_MESSAGE", java.sql.Types.VARCHAR);
    boolean isSuccessful = callableStatement.execute();
    Long receiptLogId = callableStatement.getLong("PIO_RECEIPT_LOG_ID");
    Here, when the callableStatement.execute() is fired, the isSuccessful is false and the output parameter receiptLogId is 0
    Any help appreciated.
    Regards,
    Rahul

    Hi All,
    We still haven't figured out what the problem is with JDBC when using ojdbc7.jar but, as an alternate solution we ported the code to Spring JDBC and got it working.
    Regards,
    Rahul

  • Working in Sql, not working in Stored procedure

    Dear friends,
    I am puzzled about this strange working of Oracle , although I know that there is some problem with my code. I paste my code here. The delete statement is working properly in SQL Plus 8.0, but it is not working when I call this stored procedure from the Form.
    FUNCTION delete_record_treaty (
    p_treaty_id T_RIN_TREATY_MST.TRTY_ID_GV%TYPE, p_value VARCHAR2,p_block VARCHAR2 )
    RETURN BOOLEAN IS
    v_treaty_type varchar2(5);
    BEGIN
    v_treaty_type := substr(p_treaty_id,1,3);
    if p_block !='T_RIN_GRP_DTL' and p_block != 'T_RIN_XOLSLAB_DTL' and p_block!='T_RIN_PMTSCHD_DTL' then
    delete from T_RIN_TREATY_MST where TRTY_ID_GV=p_treaty_id ;
    commit;
    end if;
    if v_treaty_type = 'QTA' then
    delete from T_RIN_GRP_DTL where TRTY_ID_MV=p_treaty_id and T_RIN_GRP_DTL.ROWID = p_value;
    commit;
    elsif v_treaty_type = 'XOL' then
    delete from T_RIN_XOLSLAB_DTL where TRTY_ID_MV=p_treaty_id ;
    delete from T_RIN_PMTSCHD_DTL where TRTY_ID_MV=p_treaty_id ;
    elsif v_treaty_type = 'FAC' then
    delete from T_RIN_PMTSCHD_DTL where TRTY_ID_MV=p_treaty_id ;
    end if;
    RETURN(TRUE);
    END delete_record_treaty;
    Thanks in advance.
    All the paramaters that I pass, are correctly being passed to this stored procedure.
    null

    I solved it.One parameter I was passing it wrongly.
    Gee :D
    Subramanian V.

Maybe you are looking for