Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Rome, Italy

    Unanswered: suspended sql script

    Hi everybody,
    i am telling that i am not a newbye in oracle sql but now i have given up fronting this issue. The problem i am having is the suspension of a query execution. i explain better. I have a script like this:

    connect my_user/my_password
    whenever sqlerror exit 1

    create table tab_1 as select ... from ... where ...

    create table tab_2 as select ... from ... where ...

    this script i called from sqlplus in unix aix like this:
    sqlplus -s /nolog <<eof

    the problem i am having is that after execution of the first query and the creation of tab_1 it doesn't start the creation of tab_2. And the most strange is that i don't have the feedback "Table created" after the creation of tab_1. This script runs dayly and sometimes runs without problems and sometimes gives the rpoblem i just described.
    So buddies, i would appreciate any idea from all of you.
    Thank you in advance,

  2. #2
    Join Date
    Jun 2003
    West Palm Beach, FL

    Cool Error, error on the wall...

    Do you get any errors?
    It may be error-ing out due to the "whenever sql error..."
    Temporarily remove the "-s" (silent) option of sqlplus to view all messages.
    Then try this:
    CONNECT my_user/my_password
    DROP TABLE tab_1;
    DROP TABLE tab_2;
    WHENEVER sqlerror EXIT 1
    CREATE TABLE tab_1 AS SELECT ... FROM ... WHERE ...;
    CREATE TABLE tab_2 AS SELECT ... FROM ... WHERE ...;
    -- etc ---
    The person who says it can't 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