473,398 Members | 2,125 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,398 software developers and data experts.

Stored Procedure _ Case STMT

Uma
Hi ..

I am writing a simple stored procedure like this ..

CREATE PROCEDURE DB2ADMIN.Proc1 (P1 INT,out P2 CHAR(20) )
RESULT SETS 1
LANGUAGE SQL
------------------------------------------------------------------------
-- SQL Stored Procedure
------------------------------------------------------------------------
P1: BEGIN
-- Declare cursor
declare V_ID_VALUE INT;
declare V_ARG CHAR(6) default 'PERM ';
-- declare cur1 cursor with return for select procname from
syscat.procedures

declare cur1 cursor with return for
select procname,
(case
when
procname='XP_LLIST' THEN 'XP_LIST'
ELSE
xpi_GetNextID(V_ARG, V_ID_VALUE)
end),
'xp'
from syscat.procedures ;
OPEN CUR1;

END P1

can I use the another stored procedure output ( xpi_GetNextID(V_ARG,
V_ID_VALUE) ) in the case statement ??
Thanks
Uma
Nov 12 '05 #1
0 1699

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Együd Csaba | last post by:
Hi, I've a problem with some of my stored procs. My config is: RH7.1, Postgres 7.3.2 I had converted a few fields of a few tables from one type to another and after this I made all the...
1
by: Todd Peterson | last post by:
I'm a newbie to DB2 and am trying to figure out how to write a stored procedure, using dynamic SQL statements to return a result set. I believe the majority of the hurdles I have been facing might...
2
by: Twan Kennis | last post by:
Question: How do I pass a returning resultset from a nested Stored Procedure (which opens a cursor including option "WITH RETURN TO CALLER") as a returning resultset from it's own? When I...
1
by: mike | last post by:
If I try and do a "SELECT IDENTITY_VAL_LOCAL() FROM SYSIBM.SYSDUMMY1" after I have run a stored procedure in DB2 version 7.2, I get the last generated Key before the CallableStatement was executed...
0
by: usenet | last post by:
Hi. I have a DB2 stored procedure that I call using JDBC. Now I'm trying to batch the call. This is done by the book: stmt = connection.prepareCall(" ... "); stmt.setString(1, "foo");...
0
by: IamtheEvster | last post by:
Hi All, I am currently using PHP 5 and MySQL 5, both on Fedora Core 5. I am unable to call a MySQL stored procedure that returns output parameters using mysql, mysqli, or PDO. I'm having a...
1
by: amgupta8 | last post by:
Note: This problem occurred when I updated the JDK from 1.3.1 to 1.4.1 or 1.4.2. Nothing else was changed in the code, other than updating the JDK on the database server (dbm cfg parm jdk_path) and...
1
by: db2user99 | last post by:
Hi All, Can anyone please help me figure out the error with these stored Procedures.I am trying to perform large updates.The Updates are being performed but it goes into an infinite loop. ...
1
by: pankajit09 | last post by:
The below is an Oracle Stored procedure --> create or replace function search_in_table( owner varchar2, table_name varchar2, search_string varchar2)
1
by: pankajit09 | last post by:
The below is an Oracle Stored procedure --> create or replace function search_in_table( owner varchar2, table_name varchar2, search_string varchar2)
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
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.