473,387 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Need no data found exception in db2

Hi,
Here is my procedure:
Code:

Expand|Select|Wrap|Line Numbers
  1. create or replace procedure test
  2. (
  3. IN javaLocale varchar(1020)
  4. )
  5. LANGUAGE SQL
  6. BEGIN
  7. DECLARE xxlocaleid char (20);
  8.  
  9. select id into xxlocaleid
  10. from tp2.tpv_pub_locale locale
  11. where locale.java_locale = substr(javalocale,1,5);
  12.  
  13. begin
  14. declare test cursor with return for
  15. select xxlocaleid from SYSIBM.SYSDUMMY1;
  16. open test;
  17. end;
  18.  
  19. end
What I want to do is when there is no data found, I want this procedure to return:
Code:

Expand|Select|Wrap|Line Numbers
  1. select 'Null', 'Null', 'inactive_rvw_cycle' rvw_cycle_name from SYSIBM.SYSDUMMY1
How to do this in DB2.


Thanks,
Raghvendra Deshpande
Jul 12 '13 #1
0 1450

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Naren | last post by:
Hi, I am a newbie to Oracle and stored procedures. Hence this question comes up. The complete scenario is like this. We have a multithreaded application using pthreads on HP-UX machine. We are...
0
by: manika | last post by:
Hi, I am trying to upload a file and then copy it to a different destination. I use File.Copy.For some files I get "File not found" exception when I try to use the File.copy utility while others...
1
by: Kim | last post by:
How can I display "No data found" in the repeater if there are no records found after selecting an item from a dropdown list. Another question is: Can repeater perform paging as in datagrid if...
9
by: Paulustrious | last post by:
Is it possible to override the behaviour of a dictionary if an object is not found? string ss=null; Dictionary<string, string> dict = new Dictionary<string, string>(); // method 1 try {...
0
by: Dithos | last post by:
Hi all, I hope somebody will be able to help me here and i am in a predicament as to how to solve this problem.i have been trying it since a week. i have 3 projects, say A, B and C. A is a...
3
by: gomzi | last post by:
hi, When I try to upload something using the fileupload control that comes with .NET I keep getting a file not found exception. This below piece of code throws up this error....
4
by: vasavimaruthi | last post by:
hi, i got class not found exception of a small jdbc program in windows. the program is like this import java.sql.*; public class Db1 { public static void main(String a)...
2
madhoriya22
by: madhoriya22 | last post by:
Hi, I am getting No Collection Found Exception .. while iterating through ArrayList in jsp page. What am I doing is : I am clicking a link <html:link href="./viewAll.do">2. View All...
5
by: stmfc | last post by:
i dont know why pl/sql block below returns no data found error. do you have any idea about it? declare c1 varchar2(80); c2 varchar2(80); begin execute immediate 'select col2 from table1 where...
4
by: yogarajan | last post by:
The specified module could not be found. (Exception from HRESULT: 0x8007007E) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.