Hi folks can you please help me in understanding how to call a pl sql file from perl script
I have a pl sql file like this
DECLARE
x NUMBER := 100;
BEGIN
FOR i IN 1..10 LOOP
IF MOD(i,2) = 0 THEN -- i is even
INSERT INTO temp VALUES (i, x, 'i is even');
ELSE
INSERT INTO temp VALUES (i, x, 'i is odd');
END IF;
x := x + 100;
END LOOP;
COMMIT;
END;
The file is named test.sql I want to call this file from a perl script. I know first we have to connect to db and then perform the process but I Don now know how to execute this file from a perl script
Basically you need to
Here is an example (I am not showing how to slurp in the script):