SET VERIFY OFF
SET FEEDBACK OFF
SET HEADING OFF
SET ECHO OFF
-- Check the parameter and skip execution if not 'Y'
DEFINE p_flag = "&1"
-- Use a PL/SQL block to conditionally execute
DECLARE
v_flag VARCHAR2(10) := UPPER(NVL('&p_flag', 'N'));
BEGIN
IF v_flag != 'Y' THEN
-- Skip all following code
RETURN;
END IF;
END;
/
-- Main script continues (only if flag was 'Y')
PROMPT Running utils.sql...
-- All your SQL statements here...
-- SELECT ...
-- INSERT ...
-- UPDATE ...
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)