2

Is possible to get oracle sqlplus output like psql? On psql i have perfectly ordered

    video=# select * from generale where titolo ~* 'brivido';
 idtitolo | titolo  | anno | genere | durata | formato |  lingua  
----------+---------+------+--------+--------+---------+----------
      653 | Brivido | 1986 | Orrore | 1:40   | Divx    | Italiano

On sqlplus(same table,same view)

          IDTITOLO|TITOLO              |ANNO                |GENERE
    ----------|--------------------|--------------------|--------------------
    DURATA                                  |FORMATO             |LINGUA
    ----------------------------------------|--------------------|--------------------
           653|Brivido             |1986                |Orrore
    1:40                                    |Divx                |Italiano


1 row selected.

Elapsed: 00:00:00.03

Very bad This is my login.sql

set feedback on;
set linesize 100
set  colsep |
column titolo format a20
column anno format a20
column genere format a20
column formato format a20
column lingua format a20
--alter session set nls_date_format = 'yyyy-mm-dd hh24:mi:ss';
set serveroutput on;
set autocommit off;
set pagesize 100;
set long 100;
set timing on;
alter session set cursor_sharing = 'EXACT'
0

Solution found,syntax correct column "namecolumn" format aN where N is number of charatchers wich you expect to see Now

SQL> select * from generale where titolo = 'Brivido';

  IDTITOLO|TITOLO            |ANNO   |GENERE      |DURATA                      |FORMATO   |LINGUA
----------|------------------------------|-------|------------|----------------------------------------|----------|----------
       653|Brivido           |1986   |Orrore      |1:40                    |Divx      |Italiano

1 row selected.

Elapsed: 00:00:00.01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.