Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2007
    Posts
    7

    Question Unanswered: SET new old prompt off

    Hi I am using SQL plus:

    spool c:\temp\x.txt
    Select &1 from dual;
    spool off

    When I look at the spool file i get this
    Enter value for 1: 1
    old 1: select &1 from dual
    new 1: select 1 from dual

    1
    ---------
    1


    I dont want "Enter value for 1: 1 old 1: select &1 from dual new 1: select 1 from dual" to show up. I tried using set autoprint off, set showmode off, set define off (this won't let me enter anything). Is there anyway to set that off?

    Thanks!

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    How about SET VERIFY OFF?

    What would you, actually want to get in the file? You've said what you do NOT want, but ... perhaps it would be nice to know the opposite.

  3. #3
    Join Date
    Apr 2007
    Posts
    7
    I just want the data nothing else to show in the spool file. I know how to get rid of everything else except that. I tried set verify off but it still shows:

    Enter value for 1: 3


    I just want this:

    1

    Anyway i can do that?

    Thanks!

  4. #4
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    set echo off
    set verify off
    set feedback off
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  5. #5
    Join Date
    Apr 2007
    Posts
    7
    Yes I did all those things and it still shows:

    "Enter value for 1: 3"

    how do i get rid of it??? Thanks!

  6. #6
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    You use define for that.
    Code:
    SQL> define 1=1
    SQL> select &1 from dual;
    
             1
    ----------
             1
    
    SQL>

  7. #7
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    You could also use accept

    test>set feedback on
    test>set verify off
    test>set echo off
    test>accept junk prompt 'this is a test:'
    this is a test:test32
    custom@test>select '&junk' from dual;

    'TEST3
    ------
    test32

    test>
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  8. #8
    Join Date
    Apr 2007
    Posts
    7
    Thank you both ways worked =)

Posting Permissions

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