Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Loop Through array in stored procedure
How can I loop through an array in a stored procedure to get the last
value in the array?
Here is my SP so far:
CREATE OR REPLACE PROCEDURE prPM_TIMER_RESULT_ST_TZ (
i_order_id VARCHAR2, i_batch_id VARCHAR2, i_timer VARCHAR2, ts OUT VARCHAR2
BEGIN
SELECT STOP_TIMESTAMP INTO tz FROM PM_TIMER_RESULT_ST WHERE order_id = i_order_id AND batch_id = i_batch_id AND timer_name = i_timer;
STR_ARRAY := split(tz, '-');
for (i=0;i<count(STR_ARRAY);i++)
{
ts = STR_ARRAY[i];
}
END;
/
Received on Tue Sep 19 2006 - 11:39:31 CDT
![]() |
![]() |