467,189 Members | 1,298 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,189 developers. It's quick & easy.

Conversion of Oracle 9i to DB2 V9

Can someone help me convert this from Oracle PL/SQL to DB2 PL UDF? If I can see this example maybe will help me with the others. Thanks in advance.

CREATE OR REPLACE FUNCTION "GETCRITERIALIST" (
I_child_care_rate_id IN CHILD_CARE_RATE.ID%TYPE )
RETURN VARCHAR2 IS

CURSOR C_spec_crit_code IS
SELECT (DECODE(ROWNUM, 1, '', ', ') || cd.short_decode_name) short_decode_name
FROM spec_criteria_child_rate sccr,
code_detl cd
WHERE cd.catgry_id = 1404
AND cd.end_date >= SYSDATE
AND cd.beg_date <= SYSDATE
AND cd.code_num_identif = sccr.spec_crit_code
AND sccr.child_care_rate_id = I_child_care_rate_id;

V_spec_crit_code VARCHAR2(2000) := NULL;


BEGIN

FOR x IN C_spec_crit_code LOOP

V_spec_crit_code := V_spec_crit_code || x.short_decode_name;

END LOOP;

RETURN V_spec_crit_code;

END getCriteriaList ;
Aug 14 '07 #1
  • viewed: 813
Share:

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Kamal | last post: by
1 post views Thread by Uma | last post: by
5 posts views Thread by Shock | last post: by
3 posts views Thread by lenygold via DBMonster.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.