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









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
PL/SQL tables
PL/SQL tables   hii, Describe the use of PL/SQL tables ?   hello,ADS_TO_REPLACE_1 PL/SQL tables are scalar arrays that can be referenced by a binary integer. They can be used to hold values for use in later queries
Advertisements
Toby's PL/SQL Editor
Toby's PL/SQL Editor What is the PL/SQL Editor? The PL/SQL editor is a plugin... easily develop and test PL/SQL code. Download You can download the plugin...) of the existing features.ADS_TO_REPLACE_2 PL/SQL
Describe the use of PL/SQL tables
Describe the use of PL/SQL tables  Describe the use of PL/SQL tables   Hi, PL/SQL tables are scalar arrays that can be referenced by a binary integer. They can be used to hold values for use in later queries
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
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.   
java anonymous class
java anonymous class  Can an anonymous class be declared as implementing an interface and extending a class
Getting the Records in PL/SQl between Date Ranges - JDBC
Getting the Records in PL/SQl between Date Ranges  Getting the records Between the Dates in PL/SQL Database by using JDBC and display through JSP
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
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
ResultSet
ResultSet   What is a ResultSet
ResultSet
ResultSet  What is a ResultSet
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
URL Block - Java Beginners
URL Block  Hello sir, How to block one website using java.for example if we want block "www.orkut.com" site,how to block this site using java... to block a URL like this?please help me.. Thanking you
ResultSet object initialization - Java Beginners
ResultSet object initialization  How to initialize resultset object  Hi friend, public interface ResultSet A ResultSet object maintains a cursor pointing to its current row of data. A default ResultSet object
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
Scrollable ResultSet - Java Beginners
to get the count of records. in a select operation like sqlstmt="SELECT * FROM... get the number of record for the Query. Your Answers use the scrollable result set, first move the pointer from first record to last record and get
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
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
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
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
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 programe executing error - Java Beginners
java programe executing error  i am creating one package to one class... Friend, If you have following java class: package newp; class Hello...!"); } } Compile as: javac -d Hello.java Execute it: java Hello
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
multiple resultset in one resultset
multiple resultset in one resultset  how to retrive multiple resultsets in one resultset in java.? plz help
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
Java get number of rows in resultset
Java get number of rows in resultset  ... to the end of the resultset. The method  rs.getRow() get the row number of the last... table, you need to create a connection between the database and the java class
Anonymous Inner Classes - Anonymous Inner Classes tutorial
.style1 { text-align: center; } Anonymous Inner Classes Except... it is known as anonymous inner classes. Here we are discussing  anonymous inner classes. ADS_TO_REPLACE_1 The anonymous inner classes is very useful
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
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
What is Anonymous FTP?
know What is anonymous FTP? Access to FTP server can be managed in two ways Anonymous and Authenticated.  In the anonymous FTP, the host providing FTP service may provide anonymous FTP access. In this case, the user log
ModuleNotFoundError: No module named 'anonymous-requests'
ModuleNotFoundError: No module named 'anonymous-requests'  Hi, My... named 'anonymous-requests' How to remove the ModuleNotFoundError: No module named 'anonymous-requests' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'anonymous-requests'
ModuleNotFoundError: No module named 'anonymous-requests'  Hi, My... named 'anonymous-requests' How to remove the ModuleNotFoundError: No module named 'anonymous-requests' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'fastq-anonymous'
ModuleNotFoundError: No module named 'fastq-anonymous'  Hi, My... named 'fastq-anonymous' How to remove the ModuleNotFoundError: No module named 'fastq-anonymous' error? Thanks   Hi, In your python
finally block
finally block  hii, If I am writing return at the end of the try block and some code in finally block, then the finally block will execute??ADS_TO_REPLACE_1   hello, certainly finally block will execute
Statement block
Statement block  What is the purpose of a statement block
resultset metadta
resultset metadta  import java.sql.Connection; import... Employee Details Using resultset metadata: "); Connection con = null...(); ResultSet rs = st.executeQuery("SELECT * FROM employee
executing Hibernate application
executing Hibernate application  when i am executing the hibernate application the following error occured. log4j:WARN No appenders could be found...) Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) can you tell me
ModuleNotFoundError: No module named 'executing'
ModuleNotFoundError: No module named 'executing'  Hi, My Python... 'executing' How to remove the ModuleNotFoundError: No module named 'executing' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'executing'
ModuleNotFoundError: No module named 'executing'  Hi, My Python... 'executing' How to remove the ModuleNotFoundError: No module named 'executing' error? Thanks   Hi, In your python environment you
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for flexible-content-block-to-text_2.11 version 0.4
-content-block-to-text_2.11 version 0.4. You can add these depency in your project to get com.gu:flexible-content-block-to-text_2.11:0.4 Java library in your... for flexible-content-block-to-text_2.11 version 0.4 In this section have given
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for flexible-content-block-to-text_2.10 version 0.4
-content-block-to-text_2.10 version 0.4. You can add these depency in your project to get com.gu:flexible-content-block-to-text_2.10:0.4 Java library in your... for flexible-content-block-to-text_2.10 version 0.4 In this section have given
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for flexible-content-block-to-text_2.10 version 0.2
-content-block-to-text_2.10 version 0.2. You can add these depency in your project to get com.gu:flexible-content-block-to-text_2.10:0.2 Java library in your... for flexible-content-block-to-text_2.10 version 0.2 In this section have given
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for flexible-content-block-to-text_2.10 version 0.1
-content-block-to-text_2.10 version 0.1. You can add these depency in your project to get com.gu:flexible-content-block-to-text_2.10:0.1 Java library in your... for flexible-content-block-to-text_2.10 version 0.1 In this section have given
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for linear-block-allocator version 4.0.0
-block-allocator version 4.0.0. You can add these depency in your project to get com.literatejava:linear-block-allocator:4.0.0 Java library in your project.. Maven...-block-allocator version 4.0.0 In this section have given the dependency code
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for linear-block-allocator version 3.6.10
-block-allocator version 3.6.10. You can add these depency in your project to get com.literatejava:linear-block-allocator:3.6.10 Java library in your project...-block-allocator version 3.6.10 In this section have given the dependency code

Ads