Forum Stats

  • 3,827,526 Users
  • 2,260,790 Discussions
  • 7,897,291 Comments

Discussions

Hide a column with SQLCL (COLUMN xxx NOPRINT) ?

User_RQ34C
User_RQ34C Member Posts: 2 Green Ribbon

Hello all,


I am trying to hide a column in a result file. For example :


COLUMN test NOPRINT

select '039' test, 'toto' from dual;


In SQLPlus or SQLDevelopper it work.

But in an execution from SQLCL with .sql file, i have not an error with COLUMN xxx NOPRINT, but in my result, the column Test is present.


SQLCl ignore NOPRINT without error ? Or did i forgot a thing ?



Thanks for your help,

Regards,

Loïc

Best Answer

  • User_H3J7U
    User_H3J7U Member Posts: 1,062 Gold Trophy
    Answer ✓
    SQL> show version
    Oracle SQLDeveloper Command-Line (SQLcl) version: 22.1.0.0 build: 22.1.0.90.1611
    SQL> show sqlformat
    SQL Format : ansiconsole
    SQL> col test noprint
    SQL> select 1 abc, 2 test, 3 xyz from dual;
    
       ABC    TEST    XYZ
    ______ _______ ______
         1       2      3
    
    SQL> set sqlformat clear
    SQL Format Cleared
    SQL> show sqlformat
    SQL Format : Default
    SQL> select 1 abc, 2 test, 3 xyz from dual;
    
           ABC        XYZ
    ---------- ----------
             1          3
    
    User_RQ34C

Answers

  • User_H3J7U
    User_H3J7U Member Posts: 1,062 Gold Trophy
    Answer ✓
    SQL> show version
    Oracle SQLDeveloper Command-Line (SQLcl) version: 22.1.0.0 build: 22.1.0.90.1611
    SQL> show sqlformat
    SQL Format : ansiconsole
    SQL> col test noprint
    SQL> select 1 abc, 2 test, 3 xyz from dual;
    
       ABC    TEST    XYZ
    ______ _______ ______
         1       2      3
    
    SQL> set sqlformat clear
    SQL Format Cleared
    SQL> show sqlformat
    SQL Format : Default
    SQL> select 1 abc, 2 test, 3 xyz from dual;
    
           ABC        XYZ
    ---------- ----------
             1          3
    
    User_RQ34C
  • User_RQ34C
    User_RQ34C Member Posts: 2 Green Ribbon

    Thanks for this answer, it help ! ☺️