473,398 Members | 2,380 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.

how to use procedures in cursor

I want to use procedure within a cursor
how can I use it

I want to pass multiple rows output to the procedure and that procedure should take that value one by one bez in my procedure i gave one argument

e.g. select ccy_pair from deal_detail;
this qry returns 432 rows
i want to pass each row to the procedure
bez in procedure i have done some calculation which is based on above ccy_pair field

plz guide me how can i solve this problem
Aug 21 '07 #1
2 1486
I want to use procedure within a cursor
how can I use it

I want to pass multiple rows output to the procedure and that procedure should take that value one by one bez in my procedure i gave one argument

e.g. select ccy_pair from deal_detail;
this qry returns 432 rows
i want to pass each row to the procedure
bez in procedure i have done some calculation which is based on above ccy_pair field

plz guide me how can i solve this problem

Hi,
In select statements, function can be used not procedure..pls convert into your procedure into function and then use it..

Thanks and regards
Michael Holding
Aug 22 '07 #2
debasisdas
8,127 Expert 4TB
It will be better to use the cursor with the procedure body and apply the logic u need to implement in side the cursor in a loop.
Aug 22 '07 #3

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

Similar topics

1
by: Robert Scheer | last post by:
Hi. I wrote some stored procedures used by a web application. As I am fairly new to Oracle, I am missing some concepts when creating these procedures, as a result, the application is suffering...
18
by: Jarrod Morrison | last post by:
Hi All I was wondering if there is a way to call a stored procedure from inside another stored procedure. So for example my first procedure will call a second stored procedure which when...
5
by: Jeff | last post by:
I have question about differences in fenced sql procedures and fenced stored procedures. Do fenced sql procedures take up an extra memory segment when executed? Reason I ask is we have several...
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...
1
by: db2sysc | last post by:
All: I am writing a MAIN CALLING PROCEDURE. This call lot of procedures. Some of the CALLED PROCEDURES end with an OPEN C1 (cursor). How to I read this open cursor in my main procedure?? In java...
28
by: mooreit | last post by:
The purpose for my questions is accessing these technologies from applications. I develop both applications and databases. Working with Microsoft C#.NET and Microsoft SQL Server 2000 Production and...
4
by: dhruv19280 | last post by:
Can someone confirm that DB2 UDB v8.1.2 does NOT support internal procedures as supported by Oracle? For example, this would work in Oracle, but not in DB2. Am I correct? CREATE OR REPLACE...
0
by: balaji krishna | last post by:
Hi, I need to handle the return set from COBOL stored procedure from my invoking Java program. I do not know, how many rows the stored proc SQL fetches.I have declared the cursor in that proc, but i...
1
by: rameshsah | last post by:
I have following procedures on Oracle database sever, Procedure_one (Number, String) Procedure_one (Number, String, Boolean) Procedure_one (Number, String, Boolean, String) It appears that I...
3
by: leesquare | last post by:
Hello, I need some help getting output values from my stored procedures when using adodbapi. There's an example testVariableReturningStoredProcedure in adodbapitest.py, and that works for my...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.