Home » Developer & Programmer » JDeveloper, Java & XML » PL/SQL function with calling java class (oracle 11g r2)
PL/SQL function with calling java class [message #584906] Mon, 20 May 2013 07:26 Go to next message
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:
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.
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
Re: PL/SQL function with calling java class [message #584912 is a reply to message #584906] Mon, 20 May 2013 07:59 Go to previous message
Michel Cadot
Messages: 68417
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If you want help, you must:
1/ Follow the OraFAQ Forum Guide
2/ Format your post as explained in How to use [code] tags and make your code easier to read
3/ Feedback and thanks those who help you

Waiting for your feedback in your previous topics...

Previous Topic: proceed registerSchema to a XSD, element becomes unwanted XMLTYPE
Next Topic: Using DELETEXML SQL function
Goto Forum:

Current Time: Thu Mar 23 07:17:04 CDT 2023