By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,287 Members | 1,284 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,287 IT Pros & Developers. It's quick & easy.

Conversion of Oracle 9i to DB2 V9

P: 2
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
Share this question for a faster answer!
Share on Google+

Post your reply

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