SQLPLus question
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: SQLPLus question

Hybrid View

  1. #1
    Join Date
    Mar 2004
    Posts
    26

    SQLPLus question

    How can I turn off the SQL>, i ONLY WANT TO GET THE RESULT,I did try

    SET VERIFY OFF
    SET HEADING OFF


    SQL> SELECT 'ALTER TABLE '|| CODE ||' THIS IS ONLY A TEST' FROM AGENCY;

    ALTER TABLE CSFM THIS IS ONLY A TEST
    ALTER TABLE TRRC THIS IS ONLY A TEST
    SQL> spool off

  2. #2
    Join Date
    Nov 2003
    Posts
    9
    Hi,

    You can use follwing set options in the sql script

    set sqlprompt ' '
    set feedback off
    set heading off

    -Deepak

  3. #3
    Join Date
    Mar 2004
    Posts
    26
    I did set those options before I post here but seem it's not working and I don't know what I am missing here:

    below is the result on my output:

    SQL> set heading off
    SQL> set verify off
    SQL> SELECT 'ALTER TABLE ' ||CODE ||' THIS IS ONLY A TEST;' FROM AGENCY;

    ALTER TABLE CSFM THIS IS ONLY A TEST;
    ALTER TABLE TRRC THIS IS ONLY A TEST;

    SQL> spool off



    below is what I have on my script:


    spool c:\temp\oracle.sql
    set heading off
    set verify off
    set linesize 120
    SELECT 'ALTER TABLE ' ||CODE ||' THIS IS ONLY A TEST;' FROM AGENCY;

    spool off

  4. #4
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Put the "spool" after the "set"s.

  5. #5
    Join Date
    Nov 2003
    Posts
    9
    use this script

    set sqlprompt ' '
    set heading off
    set verify off
    set feedback off
    set linesize 120
    spool c:\temp\oracle.sql
    SELECT 'ALTER TABLE ' ||CODE ||' THIS IS ONLY A TEST;' FROM AGENCY;
    spool off

    Hope this help

    -Deepak

  6. #6
    Join Date
    Mar 2004
    Posts
    26
    I did exaclty what you toild me and I still have the verify come back:


    SELECT 'ALTER TABLE ' ||CODE ||' THIS IS ONLY A TEST;' FROM AGENCY;

    ALTER TABLE CSFM THIS IS ONLY A TEST;
    ALTER TABLE TRRC THIS IS ONLY A TEST;
    spool off

    I have done this many times but I don't know what's going on here

    thanks

  7. #7
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    set echo off
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  8. #8
    Join Date
    Mar 2004
    Posts
    26
    I am so sorry guys, I don't know what's going on here, here what I have on my scripts:

    SQL> set heading off
    SQL> set verify off
    SQL> set feedback off
    SQL> set linesize 120
    SQL> SET ECHO OFF
    SQL> SPOOL C:\TEMP\oracle.SQL
    SQL> SELECT 'ALTER TABLE ' ||CODE ||' THIS IS ONLY A TEST;' FROM AGENCY;

    ALTER TABLE CSFM THIS IS ONLY A TEST;
    ALTER TABLE TRRC THIS IS ONLY A TEST;
    SQL> SPOOL OFF
    SQL>


    and below is my result:


    SQL> SELECT 'ALTER TABLE ' ||CODE ||' THIS IS ONLY A TEST;' FROM AGENCY;

    ALTER TABLE CSFM THIS IS ONLY A TEST;
    ALTER TABLE TRRC THIS IS ONLY A TEST;
    SQL> SPOOL OFF

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