Executing anonymous pl/sql block and get resultset in Java

Ads
 

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 anonymous pl/sql block and get resultset in Java
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
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
How are Anonymous (inner) classes used in Java?
How are Anonymous (inner) classes used in Java?  How are Anonymous (inner) classes used 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
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
multiple resultset in one resultset
multiple resultset in one resultset  how to retrive multiple resultsets in one resultset in java.? plz help
get absolute time java
get absolute time java  How to get absolute time in java
java get file permission
java get file permission  How to check the get file permission in Java
Problem in executing macro enabled excel sheet using java
Problem in executing macro enabled excel sheet using java  Hi, I have written a java code which will read a excel sheet with macro enabled. then it will write data into sheet1 and sheet2 and it will execute a VB script
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
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
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
Java Code to Block a website accessed by any browser in windows
Java Code to Block a website accessed by any browser in windows  I want create an application in Java through Netbean IDE to block any website to be accessed by any browser. I also want to display only its html contents. please
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 this xml syntx in java??????
how to get this xml syntx in java??????  how to get this xml syntx in java?????? < comp xlink:type="new" xlink:actuate="onload"/>
how to get this xml syntx in java??????
how to get this xml syntx in java??????   how to get this xml syntx in java?????? < comp xlink:type="new" xlink:actuate="onload"/>
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
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
Java Get Example
Java Get Example      ... examples to get the things fast and practice these code at your end to learn java.... Java Get Examples.. Get host name in Java: This example
How to get current timestamps in Java
How to get current timestamps in Java  Hi, I want to get the current Timestamp in Java and then use it in JDBC program. How to get current timestamps in Java? Thanks   Hi, In Java using get the current Timestamp
How to get length of string in Java?
How to get length of string in Java?  What is the method of String for getting the length? How to get length of string in Java? Tell me code fast... Tutorials"; int length = str.length(); You have to use the str.length() to get

Ads