Home > Software engineering >  'Tidy up' Oracle SQL report output
'Tidy up' Oracle SQL report output

Time:03-30

I am writing some SQL to output reports via SQL*Plus (Oracle Reflection). The output files (xlsx or lst) contain a lot of information that isn't needed in this instance, like below:

Session altered.

Enter value for 1: LIF
old   3: where a.group = '&&1'
new   3: where a.group = '123'

URN     |Title     |Forename                        |Middle Name | Surname        
--------------------------------------------------------------------------------------------------
123     | Mx       | Smith                          |Bryn        | Paul

Rows Selected 1

I am looking to suppress the leading rows so that 'URN' is located in cells A1, the row of '-' separating the headers from the data and finally the 'rows selected' output.

Thanks in advance!

CodePudding user response:

Try:

SET HEADING OFF

More info on the options here.

Edit: The option for removing the count of rows selected at the end is

SET FEEDBACK OFF

just noticed it in the question.

  • Related