I use an Oracle SQL Developer script to do a SELECT
, displaying results in Query Results window. I then copy/paste the results into an Excel template for reporting.
I would like to replace the script with a PLSQL block, to allow looping etc. The problem is that simple SELECT FROM
(without INTO
) doesn't seem to work in PLSQL.
Is there any way to use PLSQL to display the results of a select in a window which I can copy/paste from?
Note: I am disallowed from using EXPORT
to create text files directly, which would be much better than copy/paste. There is also a standard Oracle package that does output to a file directly from PLSQL, but I am disallowed from using it, too.
This post was marked as a duplicate of another post, one which asked how to get output from a SELECT that was NOT in a PL/SQL block. I do know how to do that and in fact it's what I am doing currently, as I mentioned in the OP. As I said, SELECT without INTO fails in PL/SQL.