PL/SQL function with calling java class [message #584906] |
Mon, 20 May 2013 07:26 |
|
Maslakos
Messages: 3 Registered: September 2012 Location: Poland
|
Junior Member |
|
|
Hi, i`m trying to use pl/sql function to execute java class. My problem is propably not very complex. I created 2 tables with around 100 values and java class with simple functionality. I need to create function to loop throught my table1 and get with each iteration one value from table and pass that value as parameter to java class. Maybe i will show example to better understanding.
table1 is something like this:
ID NAME
1 name1
2 name2
3 name3
. .
. .
100 name100
table2 is empty with same columns as table1 ( table2 is for data obtained from java returns )
I created in sql+ java class.
CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "myClass" AS
import java.io.*;
import java.util.*
public class myClass {
public static String fun(String strName)
{
//Some functionality
return strName_result_for_Table2;
}
}
/
Then i wanna make a pl/sql function for:
1)For i = 1 Obtain first value from table1 (column name) and pass it throught java class then return value and save it in table2 with the same id as id from table1
2) change i=1 to i=2 and do that same
3) end if i=101
Can someone help me?
Best regards
Radek
|
|
|
|