SHow like a 'msgbox'  during run of pl/sql in pl/sql developer | selecting 'output' sheet after execution

Posted on 2006-04-14
Last Modified: 2013-12-12

What i want is (if possible):
1. After the pl/sql is done running showing the ' output' sheet of pl/sql developer.
2. Showing an equivalent of the vb msgbox during excution of pl/sql statements

I hope somebody can help me with this, as searching about this didn't provide me with answer.., esp. about first question.

I wrote my code in the SQL-script window. (since that is the only window i kno so far that shows normal sql-statements as a resultset in the resultgrid that comes up below the qry)... if any1 knows how to accomplish this in pl/sql..-> gettin a resultsetgrid to show n fill under pl/sql i would be most gratefull.

*points r so high cuz i hope to get answer soon.., and becuz of the many subquestions.*


Question by:deduijk
    1 Comment
    LVL 16

    Accepted Solution

    The closest you can come is to use the dbms_output package and turn output on.... This shows all the 'output' information after the pl/sql package is completed. The drawback is that you have to use pl/sql, not straight sql though, and the results don't display....

    You can also use PROMPT in the straight sql window to display output, then have the user need to press a key.

    It isn't clear which you are after.  Here is a sample sqlplus run showing dbms_output...
    Notice the Set Serveroutput on line, then, after the pl/sql block is completed, the output lines....

    SQL> set serveroutput on
    SQL> begin
      2   for i in 1..3 loop
      3    dbms_output.put_line(to_char(i));
      4   end loop;
      5  end;
      6  /

    PL/SQL procedure successfully completed.


    OK, and you can also do a prompt in a script... I saved this script as a file on my C:\ directory as test.sql

    alter session set nls_date_format='mm/dd/yyyy hh24:mi:ss';
    select sysdate from dual;
    prompt done with sql statement

    Then I run it in the sql window as follows:

    SQL> start c:\test.sql

    Session altered.

    04/14/2006 07:38:52

    done with sql statement

    Hopefully this is what you are asking....

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
    How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
    Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now