How can we write multiple SQL Commands/Statements under one Action by using one function?

Your rating: None Average: 4 (5 votes)

Hi Friends,

Yes,we can write multiple SQL Statements by using %Execute Function.(Pls refer in Peoplbooks if required).

Example: Scenario1:
Open one SQL Action.............
%EXECUTE (/)
UPDATE PS_JOB SET NAME='PEOPLESOFT' WHERE NAME1='HRMS';
/
INSERT INTO PS_JOB VALUES('NAME','EMPID','HOME',................);
/
DELETE PS_JOB WHERE ROWNUM=10;
Note: Here forwardslash is optional to commit the statment.

Scenario2:
%EXECUTE()
UPDATE PS_JOB SET NAME='PEOPLESOFT' WHERE NAME1='HRMS';
COMMIT;
INSERT INTO PS_JOB VALUES('NAME','EMPID','HOME',................);
COMMIT;
DELETE PS_JOB WHERE ROWNUM=10;
COMMIT;

Regards,
Mahendra

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!