Sadly I don't know the exact names for each part, probably I can explain it:
We have a SQL-File, which is defined like this:
l_exec boolean := true;
l_print boolean := false;
for t in (
And so on. We use this to create some Triggers etc. in our Oracle-Database.
Now this File grew to much and I need to split it up.
So I created a Main-File, which is looking like this:
SET SERVEROUTPUT on
set feedback off
DEFINE l_exec = TRUE;
DEFINE l_print = FALSE;
ACCEPT ora_instance PROMPT "Zielinstanz angeben [123|...]: " DEFAULT somedefault
PROMPT -- GENERATING CODE --
@file1 l_print, l_exec
This would work fine, but I'd like to pass the l_exec and l_print to each file. I read in some other Threads passing the parameters like this is ok. But the problem is: I not only need to pass it from file to file, but I need to pass it to the Procedure-Block after begin.
I'm not sure if I made it understandable, but I'd like to use the variable I pass at @file1 in the begin block of the Files.
Is this kindahow possible? I googled alot about SQLPlus, but didn't find a solution so far.
Thanks as always and a nice week
Ok, so if your main file has the call to your sub-file:
... CONNECT somelogins PROMPT -- GENERATING CODE -- @file1 l_print, l_exec
then your sub-file can use the parameters in a positional manner thus:
declare l_print boolean := &1; l_exec boolean := &2; --- begin dbms_output.enable; for t in (