473,324 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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
0 900

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

Similar topics

2
by: Kamal | last post by:
PHP 4.3.4 on Apache 2.0.48 on Linux Red Hat 8.0 Kernel 2.4.18-14smp with Oracle 9iR2. I have this code: <html> <body> <?php
1
by: Uma | last post by:
Hi.. here is my question.. these are my Oracle scripts . I want the similar concepts in DB2 connect system/manager /********************************************/ /* Create the two roles...
5
by: Shock | last post by:
Hello all, I am doing some research on database conversions. Currently, I am interested in any information that would help me convert a database from one schema to another. This could be...
1
by: Jim Shank | last post by:
I am adding support to my application for Oracle 10g and using Enterprise Library Data Access Application Blocks and trying to determine the best way to convert the GUID's which are stored as...
3
by: mailar | last post by:
HI, Can anyone tell me how is a multi_byte to single byte and vice versa conversion done in DB2. It would be great even if someone can tell me how Oracle does it? Oracle already has functions...
5
by: Shibu | last post by:
Hi, I have a situation where I need to convert business objects to a flat table. The reverse is also required. I am using c# and Oracle ODP. I am looking for an easier method to do the below...
1
by: bala | last post by:
Hi Access Gurus The MS Access DB (MS Access 2002 Database) which is currently serving as the backend Database to MS Access (MS Access 2002/XP) frontend needs to be converted to Oracle 8i Backend...
0
by: Jaye | last post by:
Hi. I was wondering if anyone knows how to convert dates in the SAS format into an Oracle date format without the use of third party software. I'd like to be able to run a procedure that would...
0
by: alok | last post by:
i having problem in oracle 9i dataBase------ i want to convert my oracle data to sql 2000.....but i cant convert the hindi data from oracle to sql 2000... means...... i having table in...
3
by: lenygold via DBMonster.com | last post by:
I find this expression in Oracle query: cast(convert(char(10) ,dateadd(d,i,start),120) as datetime ) as taskday. How to convert it in DB2? Thank's in advance LENY g. -- Message posted via...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.