cuetzpalin
Programmer
Hi All,
I have a script that has an input for region code. I'm expecting the user to enter NC or SC as the values. Based on those input values I want to be able to call a certain script.
Here's a code snippet:
--------------------------------------------
PROMPT
PROMPT ENTER REGION CODE [FORMAT: NC or SC]
PROMPT
ACCEPT xREGION PROMPT 'Region code: '
PROMPT
SET TERMOUT OFF
DEFINE varREGION = '&xREGION'
SELECT '&varREGION' REGION FROM DUAL;
SELECT CASE WHEN '&varREGION' = 'NC' THEN <CALL SCRIPT>
WHEN '&varREGION' = 'SC' THEN <CALL SCRIPT>
END
FROM DUAL;
-------------------------------------------
Is it possible to do that? I tried placing the path of the script in after the THEN keyword (i.e. @\\path\code.sql)
and it doesn't work.
Please advise!
Thanks!
Ed
I have a script that has an input for region code. I'm expecting the user to enter NC or SC as the values. Based on those input values I want to be able to call a certain script.
Here's a code snippet:
--------------------------------------------
PROMPT
PROMPT ENTER REGION CODE [FORMAT: NC or SC]
PROMPT
ACCEPT xREGION PROMPT 'Region code: '
PROMPT
SET TERMOUT OFF
DEFINE varREGION = '&xREGION'
SELECT '&varREGION' REGION FROM DUAL;
SELECT CASE WHEN '&varREGION' = 'NC' THEN <CALL SCRIPT>
WHEN '&varREGION' = 'SC' THEN <CALL SCRIPT>
END
FROM DUAL;
-------------------------------------------
Is it possible to do that? I tried placing the path of the script in after the THEN keyword (i.e. @\\path\code.sql)
and it doesn't work.
Please advise!
Thanks!
Ed