Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    9

    Unanswered: creating scripts

    Hi all.
    I am writing a script to insert values into a table.
    and the script is like following:
    ------------------------------------------
    set echo on
    spool rows.sql

    INSERT INTO TABLE EMP_TABLE VALUES ('NAME0', 5 , 'MGR0' , 0 , 6965 ,'ACCESS CONTRO' );

    INSERT INTO TABLE EMP_TABLE VALUES ('NAME1', 1 , 'MGR1' , 1 , 5071 ,'DATABASE' );

    INSERT INTO TABLE EMP_TABLE VALUES ('NAME2', 3 , 'MGR2' , 3 , 7543 ,'SECURITY' );
    spool off
    ----------------------------------------------
    and I put it under C:\oracle\ora92\sqlplus\demo
    when I type
    @rows.sql or start rows.sql
    it gives me an error message

    SP2-0310: unable to open file "rows.sql"

    Am I missing something or there is an error in script.
    thanks.

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

    Re: creating scripts

    Unless that path is your default ("start in" folder in the shortcut) you must do this:

    @C:\oracle\ora92\sqlplus\demo\rows.sql

  3. #3
    Join Date
    Apr 2003
    Location
    NY
    Posts
    208

    Re: creating scripts

    When you use @, sql-plus looks in your oracle/bin directory for the file. If the file is located in a different directory, then specify the location

    SQL> @ C:\oracle\ora92\sqlplus\demo\rows.sql

Posting Permissions

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