how to pass file path as parameter between sql files within sqlplus

From: Chenggang <duancg_at_hotmail.com>
Date: 24 May 2002 15:38:33 -0700
Message-ID: <8e262639.0205241438.63594c_at_posting.google.com>



Hi,  

[Quoted] I have a problem with passing filenames with path between .sql files. The problem is the separator '/'. The example below shows the problem:  

  1. Create two sql files in ~/tmp directory:
  • <<a.sql>> :
  • begin of a.sql -- _at__at_b.sql 'as/df'
  • end of a.sql --
  • <<b.sql>> :
  • begin of b.sql -- set define on

select '&1' from dual;  

  • end of b.sql -- 2. Then go to ~/ (home directory) and login to SQL*Plus, then call a.sql like this: SQL> _at_tmp/a.sql SP2-0310: unable to open file "b.sql" SQL> 3. But if I modify a.sql to pass a value without '/' (E.g., use _at__at_b.sql 'asdf'), it runs OK: SQL> _at_tmp/x.sql old 1: select '&1' from dual new 1: select 'asdf' from dual

'ASD



asdf  

SQL> 4. Also, if I login to SQL*Plus from ~/tmp directory, the problem goes away.  

[Quoted] I will really appreciate it if anyone could share some ideas on it because I couldn't find any document explaining why the '/' character is a problem. Thanks a lot!  

Chenggang Received on Sat May 25 2002 - 00:38:33 CEST

Original text of this message