Javascript Proc
0 0
Read Time:1 Minute, 10 Second

During this post we will discuss one scenario implemented by JavaScript procedure. As per the requirement there are some DML statements stores inside the table. All these statements gets assign some execution sequence. Based on the execution define in table ,the statements should execute in the same order. As per the ask there should be an automated way to execute these DML statements rather than manual execution. We have defined a JavaScript procedure which traverses the table and build the statements as per the sequence define against these statements. The output of the process should return the total number of statements execute. Also output should display the DML statements which got executed as part of this process.

We have created the following table to hold the DML statements:

Statement Table
Javascript Proc

Execute the Procedure and observe the Output:

call proc_test();

Output:

Procedure Output

As we can see the output of the procedure which displays the complete details. Table “PROC_TESTING” holds the three statements. All these statements are assign some sequence based on the business logic. Procedure has read the entire table and sort the data based on the Sequence field. We have created an Array to hold the output of the procedure execution.

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *