Display multiline text in SQL*Plus
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: Display multiline text in SQL*Plus

  1. #1
    Join Date
    Feb 2001
    Posts
    6

    Question

    Hi All,

    Can anybody tell how to display data in a Varchar2 column if the data contains newline characters. All I get is the first line. I've looked through the environment settings but nothing is immediately obvious.

    Furthermore, I can enter newline characters when using SQL*Plus directly but when using a script the same statement generates errors.

    Any advice is greatly welcome!!

    Thx in advance

    Ben

  2. #2
    Join Date
    Feb 2001
    Posts
    389
    Read about the function ch().

  3. #3
    Join Date
    Feb 2001
    Posts
    6
    I have checked the Oracle docs but cannot find a reference to CH().

    What would a typical example look like?

    Thanks again


  4. #4
    Join Date
    Feb 2001
    Posts
    389
    Sorry,

    It is chr() and not ch().

    select 'line 1' || chr(10) || 'line 2' from dual;




  5. #5
    Join Date
    Mar 2001
    Posts
    4

    procedure builder

    Hello peeps,

    I am losing the will to live! below is the connect string for Procedure Builder....

    PL/SQL> .CONNECT DB scott/tiger@t:net:base
    PDE-POC011 ORA-06401: NETCMN: invalid driver designator
    PDE-POC004 General OCI error. An error message with more detailed information is supplied.

    why? and where does the error message with more detail live.

    I have used sql/plus and connected successfully to prove I can get in.

    Thanks for any help.

    Paul

  6. #6
    Join Date
    Aug 2006
    Posts
    8

    hello;

    03-27-2001, 05:48 PM
    Hello peeps,

    I am losing the will to live! below is the connect string for Procedure Builder....

    PL/SQL> .CONNECT DB scott/tiger@t:net:base
    PDE-POC011 ORA-06401: NETCMN: invalid driver designator
    PDE-POC004 General OCI error. An error message with more detailed information is supplied.

    why? and where does the error message with more detail live.

    I have used sql/plus and connected successfully to prove I can get in.

    Thanks for any help.

    Paul


    when i run reports ı encountered same problem. i couldn't use reports exe in descktop. i use in it on bin folder. and i can connect so i recreate it again in my desktop.and solve it.
    you must use from it 's source dont use shortcut .

    ı hope this is help for you

    gökhan dedeler
    jnr dba

  7. #7
    Join Date
    Jun 2005
    Location
    London, UK
    Posts
    159
    Perhaps I am missing something...

    Code:
    SQL> CREATE TABLE william_test2 (text_with_newlines CLOB);
    
    Table created.
    
    SQL> INSERT INTO william_test VALUES ('I wonder what
      2  the Procedure Builder question has
      3  to do with this thread which is
      4  about displaying text containing
      5  linefeeds' );
    
    1 row created.
    
    
    SQL> SELECT text_with_newlines FROM william_test2;
    
    TEXT_WITH_NEWLINES
    --------------------------------------------------------------------------------
    I wonder what
    the Procedure Builder question has
    to do with this thread which is
    
    
    1 row selected.
    
    SQL>
    SQL> show long
    long 80
    SQL> set long 2000
    SQL> SELECT text_with_newlines FROM william_test2;
    
    TEXT_WITH_NEWLINES
    --------------------------------------------------------------------------------
    I wonder what
    the Procedure Builder question has
    to do with this thread which is
    about displaying text containing
    linefeeds
    
    
    1 row selected.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width