By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,610 Members | 1,672 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,610 IT Pros & Developers. It's quick & easy.

Errors in stored procedure in db2

P: n/a
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
Share this Question
Share on Google+
1 Reply

P: n/a
Hi ,
If you have Linux or Unix Versoin of DB2 see
this folder has the SQL stored procedure samples

If you have windows the default path for the samples are C:\program

It has samples for SQL stored procedure.

Apr 19 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.