sql plus QUESTION
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: sql plus QUESTION

  1. #1
    Join Date
    Feb 2006
    Posts
    37

    sql plus QUESTION

    I AM USING sql*plus and have come across a dilemma

    At the SQL PROPMT after typing a query without a semi-colon at the end, I press "RETURN". The next line is waiting for the next command {i.e. ';' or '/' } to complete the query.

    When I press "RETURN", the SQL PROMPT takes me to a new line because I did not finish the query. Is there some way to set the SQL PLUS environment to not go to a new PROMPT, and even after I press "RETURN", to continue with the query.

    For exp:

    SQL > select sysdate from dual
    2
    SQL >

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,471

    Cool

    The query is not "lost", if you enter RETURN twice, it will go to new line.
    To continue last query just enter "i".
    Or to edit query enter "ed".
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  3. #3
    Join Date
    Feb 2006
    Posts
    37
    Thanx for the reply

    Here is the problem. A script is set to run these queries.

    SQL> grant select on xxx to xxx;
    SQL> grant select on xxx to xxx
    SQL> grant select on xxx to xxx;

    The first & last two processed but the second will not because it is missing the ';'

    In addition, we received no notification that second statement was not processed, therefore, it seemed the entire script was processed.

    Besides adding the ';' is there any way to change the SQL*PLUS environment to show the second query was not processed.

    Thanx again

  4. #4
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,471

    Cool


    You should have gotten an Oracle error "ORA-nnnnn".

    (Normally: *
    ERROR at line 2:
    ORA-00933: SQL command not properly ended)

    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

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