MySQL Forums
Forum List  »  Oracle

Re: How to convert Oracle bulk collection, table of records into mysql
Posted by: Sultana Jahan Rini
Date: February 12, 2006 04:51AM

Hello Bouman,
Thanks for ur reply..
Please find below the procedure that i want to convert into mysql. Please advise me and treat it as urgent...

With rerards
Rini
-------------------------------------------------
CREATE OR REPLACE PROCEDURE SP_test (v_routedefid route.route_def_id%TYPE,
v_rateareacode rate.area_code%TYPE,
v_lcr route_def.do_lcr%TYPE,
v_doroutefailure route_def.do_route_failure%TYPE,
v_sessionid current_calls.session_id%TYPE,
v_returnrouteid OUT route.route_id%TYPE
)
IS
TYPE routeid_type IS TABLE OF route.route_id%TYPE INDEX BY BINARY_INTEGER;
TYPE epid_type IS TABLE OF route.ep_id%TYPE INDEX BY BINARY_INTEGER;

t_routeid routeid_type;
t_areacode areacode_type;
t_epid epid_type;
v_calllimit INTEGER;

BEGIN
SELECT route_id, ep_id
BULK COLLECT INTO t_routeid, t_epid
FROM route
WHERE route_def_id = v_routedefid
AND area_code = v_rateareacode
ORDER BY (delta_t/delta_r) ASC;

FOR i IN t_routeid.FIRST..t_routeid.LAST LOOP
ep_calllimit (t_epid(i), v_calllimit);

IF v_calllimit = 1 THEN
INSERT INTO table_2
VALUES (routefailoverid_seq.NEXTVAL, t_routeid(i), t_epid(i),
v_sessionid);

COMMIT;
v_returnrouteid := t_routeid(t_routeid.FIRST); END IF;

END LOOP;
EXCEPTION
WHEN value_error THEN
v_returnrouteid := -1;
null;
END;
/

Options: ReplyQuote


Subject
Views
Written By
Posted
43866
January 03, 2005 10:56PM
25652
February 10, 2005 05:20PM
12647
August 26, 2005 03:28AM
11296
March 09, 2006 06:57AM
10595
March 09, 2006 02:09PM
7850
June 20, 2006 06:42PM
6305
January 23, 2006 10:37AM
5199
January 23, 2006 02:26PM
Re: How to convert Oracle bulk collection, table of records into mysql
7331
February 12, 2006 04:51AM
4692
September 30, 2006 01:18AM
5145
February 06, 2007 12:17AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.