473,387 Members | 3,781 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.

Errors in stored procedure in db2

Hi all,

I am writing a Stord proc in db2 in which I am querying(select query) a
table in the database and picking 2 values.These 2 values are inputs to
the next select query and so on.Totally I have to fire 5 queries and
finally all the required fields are populated in a Temporary table.

Please let me know whats the best option to do this.I have tried to
implement it using nested cursors but its giving errors.Please let me
know how to using Loops(Fetch loop,While,For etc) in stored proc and
how to break out of a loop.Also I want to know how to use the IF ELSE
condition in stored proc.

Apr 19 '06 #1
1 1457
Hi ,
If you have Linux or Unix Versoin of DB2 see
<home>/sqllib/samples/sqlproc
this folder has the SQL stored procedure samples

If you have windows the default path for the samples are C:\program
files\IBM\SQLLIB\Samples\sqlproc

It has samples for SQL stored procedure.

Apr 19 '06 #2

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

Similar topics

2
by: Brian | last post by:
Hi there, I am converting a large PL/SQL project into Transact-SQL and have hit an issue as follows: I have a PL/SQL procedure that converts a string to a date. The procedure does not know...
1
by: DB_2 | last post by:
Hello, I created the following stored procedure. (Please ignore the logic in it; at this point it is not complete and I am trying to get the basic structure working first.) CREATE PROCEDURE...
2
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
4
by: William F. Robertson, Jr. | last post by:
One of my developers came to me with this question and I don't have an answer for them. The only suggestion I had for them was to change the return to a output parameter and put a try catch around...
2
by: Ford Desperado | last post by:
In my stored procedure I'm calling a buggy and flaky stored procedure that comes from a third party. When I run my stored proceure from QA, I'm getting a whole buch of errors raised inside the...
6
by: SandySears | last post by:
I am trying to use a stored procedure to insert a record using VS 2005, VB and SQL Server Express. The code runs without errors or exceptions, and returns the new identifer in the output...
0
by: istruttorenuoto | last post by:
hi to everybody!! i wrote i script from Unix's Bourne shell that connects to an Oracle DataBase and calls a Stored Procedure. Now i'd like to insert some more commands for error managing. here's my...
0
by: cetram | last post by:
Hello! I'm trying to fix an appliaction created using ColdFusion MX and Oracle 9i. The application worked fine until our IT department reinstalled the oracle server. As far as I've been able to...
1
by: sshankar | last post by:
Hi, New to Stored procedure. Basically just installed DB2 v8.1.0.36 Was trying to build a stored procedure.. It is giving following error.. Looks like some error related to configuration...
0
by: mersis | last post by:
I have a very very annoying problem. I want to create a stored procedure, that creates a table and does various things with it. Before creating a stored procedure I check if the table is there. If it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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,...

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.