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

Source code resource

P: n/a
Does any one know of a source of (preferably DB2) sql code examples:
triggers, functions, procedures etc.? While it is all doable using the
manuals and the product, it would be much simpler to see what other
users have learned.
Nov 12 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
"Bob Stearns" <rs**********@charter.net> wrote in message
news:Xx******************@fe02.lga...
Does any one know of a source of (preferably DB2) sql code examples:
triggers, functions, procedures etc.? While it is all doable using the
manuals and the product, it would be much simpler to see what other users
have learned.


There some examples in the samples directory. However, I would look at DB2
books on the subject to get a better of idea of good coding practices. Try
searching Amazon.
Nov 12 '05 #2

P: n/a
> Does any one know of a source of (preferably DB2) sql code examples:
triggers, functions, procedures etc.? While it is all doable using the
manuals and the product, it would be much simpler to see what other
users have learned.


Yep, this is a major issue with db2, and many other products as well.
But in the case of db2 it is particularly inexcusable - give that the
product is over twenty years old.

If you're using db2 for zos then there's a shared source library
somewhere on the ibm site.

If you're not, then the db2 cookbook is probably your best bet. It's
extremely good, the best db2 resource available for any money in my
opinion, and it's a free download off the web:
http://ourworld.compuserve.com/homep...l/HTM_COOK.HTM

buck

Nov 12 '05 #3

P: n/a
"Buck Nuggets" <bu*********@yahoo.com> wrote in message

Yep, this is a major issue with db2, and many other products as well.
But in the case of db2 it is particularly inexcusable - give that the
product is over twenty years old.

If you're using db2 for zos then there's a shared source library
somewhere on the ibm site.

If you're not, then the db2 cookbook is probably your best bet. It's
extremely good, the best db2 resource available for any money in my
opinion, and it's a free download off the web:
http://ourworld.compuserve.com/homep...l/HTM_COOK.HTM

buck


The DB2 cookbook doesn't seem to have much for procedures, functions, and
triggers as requested by the OP. There are some good books on the subject,
but they are generally not free.
Nov 12 '05 #4

P: n/a
Buck Nuggets wrote:
Does any one know of a source of (preferably DB2) sql code examples:
triggers, functions, procedures etc.? While it is all doable using the
manuals and the product, it would be much simpler to see what other
users have learned.

Yep, this is a major issue with db2, and many other products as well.
But in the case of db2 it is particularly inexcusable - give that the
product is over twenty years old.

If you're using db2 for zos then there's a shared source library
somewhere on the ibm site.

If you're not, then the db2 cookbook is probably your best bet. It's
extremely good, the best db2 resource available for any money in my
opinion, and it's a free download off the web:
http://ourworld.compuserve.com/homep...l/HTM_COOK.HTM

buck

Thank you, looks good.
Nov 12 '05 #5

P: n/a
> The DB2 cookbook doesn't seem to have much for procedures, functions, and
triggers as requested by the OP. There are some good books on the subject,
but they are generally not free.


Well, this subject could be an entire book by itself - and Paul Yip did
produce one. Haven't seen this book, but have heard it was good.

Still, the book Graeme Birchall has been updating it a couple of times
a year, and in the last few years has been adding substantial chapers
on stored procedures, udfs, recursion, and triggers. Am looking for a
detailed chapter on SPL.

buck

Nov 12 '05 #6

P: n/a
My sqllib\samples directory is full of sample code. Also, try

http://www.developer.ibm.com/isv/tech/sampdb2.html

http://www-306.ibm.com/software/data...8/samples.html

Larry Edelstein

Bob Stearns wrote:
Does any one know of a source of (preferably DB2) sql code examples:
triggers, functions, procedures etc.? While it is all doable using the
manuals and the product, it would be much simpler to see what other
users have learned.

Nov 12 '05 #7

P: n/a
Bob Stearns wrote:
Does any one know of a source of (preferably DB2) sql code examples:
triggers, functions, procedures etc.? While it is all doable using the
manuals and the product, it would be much simpler to see what other
users have learned.


i have the 2nd edition of the procedure book from IBM, prentice hall. i
found it quite good. skip the first edition, if you happen across one.
not so good.

Bob
Nov 12 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.