Executing anonymous pl/sql block and get resultset in Java
Hello All,
I would like to execute the anonymous pl sql block and need to get the resultset object. I got the code which can be done by using cursors inside the pl sql block.
But the pl sql block itself will come from the database as text. So i cant edit that pl sql block. And it will return only two values whose column names will be same always.
Here i am giving sample pl sql block.
BEGIN
RETURN
'select distinct fundname d, fundname r from LOVFUNDDETAILS
where condition
order by 1';
EXCEPTION
WHEN OTHERS THEN
RETURN
'SELECT ''Not Available'' d, ''Not Available'' r FROM dual';
END;
Any help will be greatly appreciated.
Regards,
Raj
View Answers
Ads
Related Tutorials/Questions & Answers:
executing mysql plsql block using hibernate
executing mysql plsql
block using hibernate I got one requirement like this,
I have to execute following query by using hibernate
DECLARE @i_STARTDATETIME DATETIME
DECLARE @i_ENDDATETIME DATETIME
DECLARE @o_ERRORCODE INT
Advertisements
PL/SQL Terms
PL/
SQL Terms
SQL
SQL is an English like language consisting of commands to store, retrieve,
maintain & regulate access to your database.
 
while executing a java program
while
executing a
java program while iam
executing a simple
java program
after i type "
java simple.java"
there was a an error occuring.the error is
"exception in thread "main" java.lang.noclassdeffounderror:simple"
what thus
ResultSet In Java
that are mostly used in to
get the
value.
ResultSet contains the data of a table after
executing the
SQL queries.
Object of
ResultSet also maintains the current position...
ResultSet In
Java
In this section we will learn about the
ResultSet in
Java
Java Function for block inside a block
Java Function for
block inside a block Write a function in
Java that attempts to place a set of squares of varying widths into another, larger square. If there is no possible layout, return undefined. Otherwise, return
Java Function for block inside a block
Java Function for
block inside a block Write a function in
Java that attempts to place a set of squares of varying widths into another, larger square. If there is no possible layout, return undefined. Otherwise, return
Executing Set of SQL statements in Java
Executing Set of
SQL statements in Java Hi,
I am trying to execute a procedure which is stored in MS
SQL server's database. I have configured...");
cstmt=conn.prepareCall("{proc_name}");
ResultSet rs
executing java program with 2 classes
executing java program with 2 classes how to run a program of
java containing more than one class....ex of program is given below....
class C...);
}
}
Executing java program with 2 classes
save the file with D.java
Get Column Count using ResultSet in SQL
Get Column Count using
ResultSet in
SQL
 .... The ResultSetMetaData interface
can be used to
get type and properties information of columns in a
ResultSet.
The ResultSetMetaData object can be obtained by invoking
doubt on synchronized block in java
doubt on synchronized
block in java Hi ! some people are feeling... am a beginner.I am learning
java with out any teacher.I need your valuable
suggestinons.Today i am going to ask on synchronized
block.
the general form
When finally block is not executed in Java?
When finally
block is not executed in
Java? Hi,
I have read that finally
block is always executed in
Java. But I want to know if there is any conditions when finally is not executed.
When finally
block is not executed in
Java
When finally block is not executed in Java?
When finally
block is not executed in
Java? Hi,
I have read that finally
block is always executed in
Java. But I want to know if there is any conditions when finally is not executed.
When finally
block is not executed in
Java
ResultSet
ResultSet I want to retrieve data of unknown datatype from database.how to do it using
resultset or Resultsetmetadata.Can you please tell me what... = con.createStatement();
ResultSet rs = st.executeQuery
anonymous class
anonymous class what actually is an
anonymous class and what is the use of it along with the simple example?
if there is a video explaining it that will be fine
Java get number of rows in resultset
Java get number of rows in
resultset
 ... to create a connection between the database and the
java class file. ... of the database.
createStatement()- This method is used for sending
sql statements
Anonymous Classes
executing a given
anonymous class definition.
Anonymous classes can...
Anonymous Classes
A local class that is defined without a name is known as
Anonymous class
How to get Java SDK
How to
get Java SDK Hi,
I have purchased a new computer and installed windows 7. Now I have to
get the
Java SDK and install on my computer for developing and testing
Java programs.
So, can anyone tell me How to
get Java SDK
get median in java
get median in java How to
get the median value in
Java from the given list.
import java.util.*;
class FindMedian {
public static int findMedian(int array[]) {
int length=array.length;
int[] sort = new int[length
Java get System Locale
Java get System Locale
In this section, you will learn how to obtain the locale. We are
providing you an example which will obtain the locale of the system
How to get the current date in Java?
How to
get the current date in
Java? Hi,
I am new to
Java... in
Java?
Thanks
Hi,
Check the tutorial:
Java program to
get current date.
Thanks
Hi,
To
get the current date and time in
Java you can use
Resultset - JSP-Servlet
Resultset I am writing while(rs.next){}
but if
resultset is null then it cannot enter in while
block.
I want,if
resultset is null then it will enter into the while
block. Hi friend,
A
ResultSet object
How to get enum value in Java
How to
get enum value in Java Hi all, i am looking for a solution to
get an enum value from index in
Java.
Please suggest.
Thanks