Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2002
    Location
    USA-CA
    Posts
    36

    Question Unanswered: How to avoid new line in select ... from dual;

    Hi,

    When I do :


    select 'aaaaaa' from dual;

    select 'bbbbbb' from dual;

    select 'ccccccc' from dual;


    it works by the following way:


    aaaaaaa
    [new line]
    bbbbbbb
    [new line]
    cccccccc
    [new line]

    Do you know how to avoid [new line]?

    Many thanks in advance.
    John Smith

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: How to avoid new line in select ... from dual;

    Try adding

    SET FEEDBACK OFF

    to your script before the SQL.

  3. #3
    Join Date
    Apr 2002
    Location
    USA-CA
    Posts
    36

    ...it doesn't work. see detailsin the body

    ...it doesn't work

    sqlplus -s ${WRK_DB} <<- EOD >> ${log_file}.log
    set head off
    set linesize 500
    set feedback off
    select ' ' from dual;
    select '/-----------------------\' from dual;
    select '+-----------------------+' from dual;
    select '|John |' from dual;
    select '+-----------------------+' from dual;
    select '\-----------------------/' from dual;
    select ' ' from dual;


    The result is:

    /-----------------------\
    [new line]
    +-----------------------+
    [new line]
    |John |
    [new line]
    +-----------------------+
    [new line]
    \-----------------------/
    [new line]


    Please advice.
    Thanks in advance.

    John Smith

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: ...it doesn't work. see detailsin the body

    OK, you also need to add (I forgot I had done this):

    SET PAGESIZE 0

  5. #5
    Join Date
    Apr 2002
    Location
    USA-CA
    Posts
    36

    Many Thanks!!! It works!!!

    Many Thanks!!! It works!!!
    John Smith

  6. #6
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Many Thanks!!! It works!!!

    Alternatively, you could do this:

    prompt
    prompt /-----------------------\
    prompt +-----------------------+
    prompt |John |
    prompt +-----------------------+
    prompt \-----------------------/
    prompt

Posting Permissions

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