How to see the output of stored procedure in database express edition 10g

Hi All,
I have done the workout query in database express edition
create or replace procedure emp_ra (did in number) is
commission real;
no_comm exception;
begin
select commission_pct into commission from employees where department_id = did;
if commission is null THEN
raise no_comm;
else
DBMS_output.put_line(commission);
end if;
EXCEPTION
WHEN no_comm THEN
DBMS_OUTPUT.PUT_LINE ('This employee does not receive a commission.');
WHEN OTHERS THEN
NULL;
end;
the procedure compiled successfully with out any error.
After this i executed the below
set serveroutput on
Begin
emp_ra (90);
end;
it says
Statement processed.
0.00 seconds
But i unable to see the result,could anyone please help me on this.
Thanks
Edited by: thelakbe on May 7, 2012 11:17 PM
Edited by: thelakbe on May 7, 2012 11:17 PM
Edited by: thelakbe on May 7, 2012 11:18 PM

i exectued the same procedure in XE Database and have errors:
SQL> create or replace procedure emp_ra (did in number) is
  2  commission real;
  3  no_comm exception;
  4  begin
  5  select commission_pct into commission from employees where department_id =
did;
  6  if commission is null THEN
  7  raise no_comm;
  8  else
  9  DBMS_output.put_line(commission);
10  end if;
11  EXCEPTION
12  WHEN no_comm THEN
13  DBMS_OUTPUT.PUT_LINE ('This employee does not receive a commission.');
14  WHEN OTHERS THEN
15  NULL;
16  end;
17  /
Advertencia: Procedimiento creado con errores de compilaci¾n.I am not a expert of SQL but i think your variables are wrong and you must initialize
commission real;
no_comm exception;For better information open a new thread at SQL Forum.

Similar Messages

  • How to see the output of associative array in procedure

    Hi ,
    I tried the following code
    And confused about looking at the output of the associative array.
    CREATE OR REPLACE PACKAGE test_pak1
    AS
       FUNCTION map_object (obj_typ_in VARCHAR2)
          RETURN VARCHAR2;
       CURSOR c_c1
       IS
          SELECT * FROM emp;
       TYPE test_ttyp IS TABLE OF c_c1%ROWTYPE
                            INDEX BY PLS_INTEGER;
       PROCEDURE search_obj (obj_type VARCHAR2);
    END;
    CREATE OR REPLACE PACKAGE BODY test_pak1
    AS
       FUNCTION map_object (obj_typ_in VARCHAR2)
          RETURN VARCHAR2
       IS
       BEGIN
          dopl ('Hello');
          RETURN abc;
       END;
       PROCEDURE search_obj (obj_type VARCHAR2)
       IS
          test_tab   test_ttyp;
       BEGIN
            DOPL  (test_tab);
          end;
       END;In the above code i want to see the output of the test_tab which is in the procedure search_obj.
    could you please help me in this
    Thanks

    Hi ,
    Though the table has the records , the associatve array declared on this table is showing 0 records..
    Create or replace package test_pak1 as
    FUNCTION map_object ( obj_typ_in VARCHAR2 ) RETURN VARCHAR2;
      CURSOR c_c1
        IS
    SELECT  *
            FROM dept;
        TYPE test_ttyp IS TABLE OF c_c1%ROWTYPE INDEX BY PLS_INTEGER;
    procedure search_obj(obj_type varchar2);
    end;
    Create or replace package body test_pak1 as
    FUNCTION map_object ( obj_typ_in VARCHAR2 ) RETURN VARCHAR2
         IS
      begin
           dbms_output.put_line ('Hello');
      return 'abc';
    end;
    procedure search_obj(obj_type varchar2) is
       test_tab test_ttyp;
      begin
        DBMS_OUTPUT.put_line ('nested array count value'|| test_tab.COUNT);
                             FOR i IN 1 ..  test_tab.COUNT LOOP
                                 dbms_output.put_line( test_tab(i).deptno||' '|| test_tab(i).dname);  end loop;
       end;
    end;  
    begin
      test_pak1.search_obj('HYD');
    end;  Though the table has the records the count of the associative array is showing 0 records ... Why
    Thanks

  • How to see the output of a FORM of REMITTANCE ADVICE ( PAYMENT ADVICE )??

    Hi Experts,
    I got a SAP Script of REMITTANCE ADVICE (also known as PAYMENT ADVICE).
    And I know the VENDOR #.
    I need to see the output of this SAP Script on the screen, so, let me know that, How to test it/see its output. (I know, seeing the Customer statemet from the tx of F.27), I mean, wht r the transactions etc. stuff.
    thanq

    You should create a variant for payment advice and you can use the same while executing the t.code:F110.
    Once payment run has been completed system will generate a spool for payment advice. You can view that payment advice through t.code:SP01.

  • How to get the output of a procedure in to a log file ?

    Hi, Everyone,
    Could you please tell me
    How do i write the output of a procedure to a log file ?
    Thanks in advance...

    Hi,
    could you please explain me more on how to use the UTL_file to get the output to a log file as in am new to PL/SQL
    my script file is
    EXEC pac_sav_cat_rfv.pro_cardbase (200910,'aaa',100,'test_tbl');
    i need the output of this statement in a log file.
    Could you please explain to me how it can be done.
    thanks in advance

  • How to see the source code of procedure

    how to see the sourse code of already created procedure or function

    Select text
      from all_source
    where owner = '<Procedure owner>'
       and type  = 'PROCEDURE'
       and name  = '<Procedure name>'

  • How to see the content of stored prodecure in sql plus worksheet or sql.plu

    Hi
    i want to see the content of the stored procedure on sql worksheet or sql plus. is there any command for this ?
    please let me know
    thanks

    Hi Anil:
    Following is for SQL*Plus
    If you are logged on to the schema that owns the stored procedure you can issue the following query:
    select text from user_source where name = 'MY_PROG_NAME'
    ORDER BY TYPE, LINE ASC;
    Where MY_PROG_NAME could be the name of a package, procedure or function. Note that when you look at a package source you'll get the specfification and the body listing, in that case you may want to split them into two with following queries:
    spool MY_PROG_NAME.spec
    select text from user_source
    where name = 'MY_PROG_NAME'
    AND TYPE = 'PACKAGE'
    ORDER BY TYPE, LINE ASC;
    SPOOL OFF
    spool MY_PROG_NAME.body
    select text from user_source
    where name = 'MY_PROG_NAME'
    AND TYPE = 'PACKAGE BODY'
    ORDER BY TYPE, LINE ASC;
    SPOOL OFF
    If you are logged on as SYSTEm, you can substitute USER with DBA and look at code for all schemas, however you may need to add OWNER to your query.
    DESC USER_SOURCE
    Name Null? Type
    NAME NOT NULL VARCHAR2(30)
    TYPE VARCHAR2(12)
    LINE NOT NULL NUMBER
    TEXT VARCHAR2(2000)
    DESC DBA_SOURCE
    Name Null? Type
    OWNER NOT NULL VARCHAR2(30)
    NAME NOT NULL VARCHAR2(30)
    TYPE VARCHAR2(12)
    LINE NOT NULL NUMBER
    TEXT VARCHAR2(2000)
    Hope this helps,
    Thomas

  • How to access the Custom Data type variable given in Expression edit control To and From LabVIEW

    Hello, I would like to know how to access the custom data type variable given in the Espression Edit Control from LabVIEW and vice-versa
    Say, the FileGlobals.Reference_Handle (Custom Data Type Variable) contains the
    VISA I/O session (Which in turn contains VISA_DeviceName: String, Session: Number),
    Channel1: Number and
    Channel2: Number
    I am expecting the user to give FileGlobals.Reference_Handle as the input at the ExpressionEdit Control in the edit screen of the VI Call.
    I would like to know how to get the values of this custom data type to LabVIEW?
    Say, if I have the Cluster in LabVIEW like VISA I/O session (Deive Name and Session Number), Channel1 and Channel2
    how do i need to set this cluster to the Custom Data type variable in TestStand?
    Thanks and Regards
    Prakash 

    Hi,
    TestStand to LabVIEW: i didnt understand what you r trying to achieve. But if you are using references, Use Property nodes and Invoke nodes to achieve what you want in LabVIEW.
     LabVIEW to TestStand: check the image below: You need to click the button next to 'container'. I have used a cluster output in the VI.
    Hope this helps
    .......^___________________^
    ....../ '---_BOT ____________ ]
    ...../_==O;;;;;;;;_______.:/
    Attachments:
    1.JPG ‏187 KB

  • How to view the pdf files stored in client side using  forms 10g

    Hi All,
    I am using webutil to upload and download the blobs from database. I susccessfully uploaded/downloaded the blobs from database to client(d:\temp.one.pdf)
    Now I want to view the download pdf through form.
    Can anyone help me regarding this?

    I have tested the sql and found that there are no records in the table in which iam uploading the file
    In the form, I am joing tow tables mapping with rpt_num
    Even after adding information for the image table like image_no,image_name and
    when i click on upload to db icon. it gives me the same error WUT-113
    I think I need to save this basic information first and then upload the file
    can you please advise where can i add this code to save the data first
    below is the code iam using to upload the file from database
    PROCEDURE UPLOAD_DB IS
    l_success boolean;
    BEGIN
    l_success := webutil_file_transfer.Client_To_DB_with_progress
    (clientFile => :images.file_name
    ,tableName => images'
    ,columnName => 'RPT_IMAGE'
    ,whereClause => 'RPT_NUM = ''' || :PVT.PVT_SA_RPT_NUM || ''''
    ,progressTitle => 'Upload to Database in progress'
    ,progressSubTitle=> 'Please wait'
    ,asynchronous => false
    ,callbackTrigger => null
    if l_success
    then
    message('File uploaded successfully into the Database');
    else
    message('File upload to Database failed');
    end if;
    exception
         when others
         then
         message('File upload failed: '||sqlerrm);
    END;

  • Debug Stored procedure or database trigger by 10g Forms

    Hi,
    I want to debug my table level trigger (On update for each row), I am updating this table by forms. When I debug this form I am unable to watch the database debug.
    Please help me regarding database trigger/function/procedures by debugging forms.

    not possible via forms
    you can debug it on SQL Developer by using manual INSERT Updates commands

  • How to see the ouput of a purchase order on screen??

    Hi all , how to see the output of a purchase order (ME23) on screen?
    Points will be awarded!!!!
    Thanks & Regards
    John

    Hi,
    If any output tye is associated to PO and it is been triggered then User ME9F tocde to view the output.
    To check thise first Use: ME23 and click on Messages, if any outputs are triggered and they are in Yellow status then Use ME9f. Once you execute you will get Outputs in the screen, then choose the output and click on Display Message button. Your output will be displayed on the screen.
    Regards,
    Ashok

  • How to see the datas stored in DBMS_SQL.Varchar2S variable?

    how to see the datas stored in DBMS_SQL.Varchar2S variable?
    it says error if i use dbms_out.put_line.

    in PLSQL :
    procedure p_try (p_test IN OUT DBMS_SQL.VARCHAR2S) is
    begin
        p_test.delete ;
        p_test(    -3000) := '===============' ;
        p_test(       22) := 'Hello'  ;
        p_test(    55555) := 'World' ;
        p_test(987654321) := '===============' ;
    end p_try;
    set serveroutput on
    declare
         l_test dbms_sql.varchar2s ;
         i number ;
    begin
         p_try (l_test) ;
         i :=  l_test.first ;
         while i >= l_test.first and i <= l_test.last loop
                 dbms_output.put_line (l_test(i)) ;
                 i := l_test.next(i) ;
         end loop ;
    end ;
    ===============
    Hello
    World
    ===============when using Forms, you would use TEXT_IO instead of DBMS_OUTPUT

  • How to see the procedure code ?

    Hi all i have created a stored procedure .
    How can i see the code of that procedure ?
    I mean in which user_object is it stored ?
    Srini

    I did my stored function code several months ago, and accidently deleted it from my body of SQL/DDL files.That's why Nature gave us source control. Next time you may not be so lucky: the reason why you need to find the source might be because someone's dropped it from the database. Or they might have wrapped the code so the source is unreadable.
    Of course, it maybe that rewriting a procedure results in a better, more elegant solution. I know I often feel that if only I had the time, I would love to rewrite large swathes of my current project. But, unlike the professor in Insignificance, few of us have the luxury. Obviously there are other benefits to source control other than not having to rewrite lost code (configuration management is the other main one). Whatever. A lot of people seem to like Subversion, perhaps because it's free.
    Cheers, APC
    Message was edited by:
    APC

  • How can i see the output of a form

    I am having one driver program and form.From these two how can i see the output.

    Hi Sunny
    You might already know; but for the driver program; a smartform is just a function module.
    (In the smartform; this function module name can be found in the menu tab Environment -> Function Module Name.)
    Note: The FM 'SSF_FUNCTION_MODULE_NAME' is obviously the correct way of getting the FM name from the smartform name !!
    So all you need to do is call this function module passing any variable / tables you need to pass to the smartform from your driver program.
    Hope it helps
    Neer

  • How to see the changed output for purchase order

    Hi..
    I have zmedruck. i need to increse item text lengh. i done this in editor. how to see the changed output now...I increased the length of text to be displayed. I checked the print preview in me23n. i cant see the increased length. Guide me where i am wrong.
    Edited by: Meena 303 on May 1, 2008 6:24 PM

    Hi
      In ME22N go to message -
    > select old message -
    >click change OutPut button -
    > Save
    then see print priview  through ME9F or ME22N it sself.
    regards
    Sachin

  • I have transefer function like (1/(s^2+s+​5)) and i have a square wave input , i want to use this transfer function with this input to see the output , how can i do that , with example please.

    i need to know also how to represent this transfer function in labview, try to send me example. answer me at my mail

    "st" wrote:
    > answer me at my mail
    give a valid e-mail first, and your name, we don't like to help anonymous
    people
    > try to send me example.
    how much do you pay ?
    > i have transefer function like (1/(s^2+s+5)) and i have a square wave
    > input , i want to use this transfer function with this input to see
    > the output , how can i do that
    First you have to know what you are doing, like an engineer : you have a
    Laplace, continuous time transfer function but LabView handles discrete
    signals only. Use matlab/simulink if you want to simulate continuous time
    systems easily...
    If you definitely want to use LabView, the first step is to discretize your
    continuous-time transfer function, i.e. decide a sampling rate and convert
    it to a "z transfor
    m". Then you can directly use the "IIR Filter.vi" as I
    said earlier.
    Philippe Guglielmetti - www.dynabits.com me at my mail

Maybe you are looking for

  • Unable to edit shopping in hold status

    Hello,    I created a shopping cart and put it on hold.Shopping cart is created with errors.Now i want to correct the errors. But i am unable to edit it.its an extended classic scenario. Am i missing anything. I am new to SRM Could someone please hel

  • Having 2 PathTrim in Apache not working

    Hi, please shed light on why This might not be working, I am using Apache 2.0 <Location /Loc1> SSLRequireSSL Debug ON WLLogFile /tmp/plugin1.log SetHandler weblogic-handler SecureProxy ON TrustedCAFile vrty.crt RequireSSLHostMatch false PathTrim /Loc

  • How can i get the 'like in photoshop' preset?

    I was watching an Illustrator 6 tutorial and the instructor was able to change his workspace to resemble photoshop with a 'Like in photoshop' preset. There was also an InDesign and FreeHand preset as well. Is this a feature that needs to be enabled o

  • ITunes thinks I need too much space

    Itunes 8.3 + OS3.0 For some reason, iTunes thinks I need 21GB for my songs when I try to sync, but they only consume 6GB (reported by iTunes at the bottom of the screen). If I select the checkbox to only sync checked items, then the sync works correc

  • Sum in Internal Tables

    Dear Friends, I AM WRITING A REPORT TO SHOW THE ALL THE POs WHOSE GRs HAS BEEN DONE BUT NOT THE IRs. LIKE :- Serial_no    Vendor_no    vendor_name     Po_no         ItemNo       GR_no          Ref_Doc_num          Amount I GOT THE REPORT BUT NOW MY U