[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2140
  • Last Modified:

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

Hi,

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.*

TIA,
deduijk

0
deduijk
Asked:
deduijk
1 Solution
 
RCorfmanCommented:
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  /
1
2
3

PL/SQL procedure successfully completed.

SQL>

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.


SYSDATE
-------------------
04/14/2006 07:38:52

done with sql statement
SQL>

Hopefully this is what you are asking....
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now