creating a file path variable for SQL*Plus or any other tool.
594752Sep 18 2007 — edited Sep 18 2007I am trying to define something I will call FilePath using a DEFINE statement.
DEFINE FilePath = '\\Nsgnvl_files\RCO\R_C_Assurance\Work\Duane\MonthEnd\';
I want to be able to concatenate the file name to it and run a bunch of them from the same directory. When they go into production, the path will probably change. I don't want to change every one of 20 or 30 lines every time the path changes. How can I do this? I have tried every angle using the concatenation operator (||) and many others, but I always end up with an error that shows the string followed by .sql Not Found but no file name is in the error message.
Here are some examples:
@&FilePath+'MyFile.sql';
@&FilePath||'MyFile.sql';
@&FilePath,'MyFile.sql';
@&FilePath;'MyFile.sql';
@&FilePath||"MyFile.sql";
@&FilePath 'MyFile.sql';
None works. And there are more. I get the same error every time. In the error message, I see the literal path, but not the file name 'MyFile'.
Thanks in advance for some help. I am sure this type of thing is done all the time.