Running Queries in Test Script Window

Jimbo1

Member
Hello Folks,

I have a Package Procedure that is populating a Global Temp Table I'd like to query. The table contains some CLOB columns, so ideally I'd like to view it in the "Query Results Display" in the SQL Window, so that I can easily double-click on the CLOB columns to see what's in them.

I cannot seem to run PL/SQL package procedures and functions from the SQL Window, using the EXEC Keyword. The only option I have that works for me is to run the procedure and associated query in the Command Window. Unfortunately, that presents me with a SQLPlus-type view of the Temp Table's query results, which is not convenient for viewing CLOBS.

I need to run the query of the temp table in the SAME session that executed the procedure that populated it.

I've taken a look in the Help Notes, and have found the following in the "Testing Programs" section:

> In a Test Script you are not limited to PL/SQL
> blocks. You can also execute single SQL
> statements, including select statements.
> Executing a select statement will display an
> additional Results tab page, which displays all
> selected rows.

In the Test Window, I've tried running a single SQL statement after the "END;" tag of the PL/SQL block that runs my procedure. It doesn't work. I get an error stating:

> PLS-00103: Encountered the symbol "SELECT".

Is it possible to somehow run a SQL statement in the same test session I ran the script in, or are the instructions I've quoted above 'inaccurate' when related to the Test Window?

As already stated, running in a Command Window is not an option.

The script I'd like to run is:

begin
-- Call the procedure
xml_utilities.p_run_xml_conversion;
end;

SELECT * FROM tmp_conversion_results;
 
You can do this from the SQL Window. You need to add a trailing / to the PL/SQL Block though:

Code:
begin
  xml_utilities.p_run_xml_conversion;
end;
/

SELECT * FROM tmp_conversion_results;
 
Back
Top