469,360 Members | 1,774 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,360 developers. It's quick & easy.

PL/SQL programming in DB2

Hi guys. i would like to develop functions and procedures to execute
in db2 upon occurence of certain events within the stored data in db2.
I understand Oracle databases have Procedural language extensions to
Sql which makes this a lot easier. Is this also possible with db2.
Anyone with links to threads or sites with explanations on how to
program in db2 please assist

May 8 '07 #1
4 12639
On May 8, 4:23 pm, Akaketwa <akake...@gmail.comwrote:
Hi guys. i would like to develop functions and procedures to execute
in db2 upon occurence of certain events within the stored data in db2.
I understand Oracle databases have Procedural language extensions to
Sql which makes this a lot easier. Is this also possible with db2.
Anyone with links to threads or sites with explanations on how to
program in db2 please assist
In DB2-land it is called SQL PL.
Following Google search will give you a lot of info on the IBM-site
(including very good articles on its 'developerworks' site:

http://www.google.com/search?hl=en&l...2+%22sql+pl%22

If you're done reading these, you can remove the site-reference to get
additional non-ibm info... ;-)

HTH

--
Jeroen

May 8 '07 #2
On May 8, 4:51 pm, Jeroen van den Broek
<nlt...@baasbovenbaas.demon.nlwrote:
On May 8, 4:23 pm, Akaketwa <akake...@gmail.comwrote:
Hi guys. i would like to develop functions and procedures to execute
in db2 upon occurence of certain events within the stored data in db2.
I understand Oracle databases have Procedural language extensions to
Sql which makes this a lot easier. Is this also possible with db2.
Anyone with links to threads or sites with explanations on how to
program in db2 please assist

In DB2-land it is called SQL PL.
Following Google search will give you a lot of info on the IBM-site
(including very good articles on its 'developerworks' site:

http://www.google.com/search?hl=en&l...com+db2+%22sql...

If you're done reading these, you can remove the site-reference to get
additional non-ibm info... ;-)

HTH
http://www-128.ibm.com/developerwork...le/dm-0412liu/

is 'plugging' a book on DB2 SQL PL written by a team from the Toronto
Lab, but also offers a free download of chapter2 of the book ('Basic
SQL Procedure structure') and sample code.

--
Jeroen

May 8 '07 #3
On May 8, 7:59 am, Jeroen van den Broek
<nlt...@baasbovenbaas.demon.nlwrote:
On May 8, 4:51 pm, Jeroen van den Broek

<nlt...@baasbovenbaas.demon.nlwrote:
On May 8, 4:23 pm, Akaketwa <akake...@gmail.comwrote:
Hi guys. i would like to develop functions and procedures to execute
in db2 upon occurence of certain events within the stored data in db2.
I understand Oracle databases have Procedural language extensions to
Sql which makes this a lot easier. Is this also possible with db2.
Anyone with links to threads or sites with explanations on how to
program in db2 please assist
In DB2-land it is called SQL PL.
Following Google search will give you a lot of info on the IBM-site
(including very good articles on its 'developerworks' site:
http://www.google.com/search?hl=en&l...com+db2+%22sql...
If you're done reading these, you can remove the site-reference to get
additional non-ibm info... ;-)
HTH

http://www-128.ibm.com/developerwork...rticle/dm-0412...

is 'plugging' a book on DB2 SQL PL written by a team from the Toronto
Lab, but also offers a free download of chapter2 of the book ('Basic
SQL Procedure structure') and sample code.

--
Jeroen- Hide quoted text -

- Show quoted text -
I can't say enough good things about the book Jeroen references. If
you're going to write DB2 SPs, UDFs, or inline SQL PL (analogous to PL/
SQL's anonymous blocks), it's indispensable.

--Jeff

May 8 '07 #4
>>I understand Oracle databases have Procedural language extensions to SQL which makes this a lot easier. <<

Oracle's PL/SQL is like, but not identical to, the Standard SQL/PSM.
Most of the time you can translate it easily (they use ":=" instead
of "SET.. =..", etc.) IBM is a pretty good implementation of the SQL/
PSM. For a good discussion and some details on procedural
extensions to SQL, get Jim Melton's book "understanding SQL's Stored
Procedures" A Complete Guide to SQL/PSM" (ISVBN10" 1-555860-461-8)
May 9 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Martin | last post: by
12 posts views Thread by G. | last post: by
134 posts views Thread by evolnet.regular | last post: by
7 posts views Thread by Robert Seacord | last post: by
30 posts views Thread by Jakle | last post: by
47 posts views Thread by Thierry Chappuis | last post: by
14 posts views Thread by deko | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.