Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / April 2006

Tip: Looking for answers? Try searching our database.

Parsing arrays parameters in DB2

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jaraba - 27 Apr 2006 15:08 GMT
Hi, I am working on creating reports for which I want to make a single
stored procedure call to the DB. In order to do so, I need to be able
to parse an array of parameters containing elements as follows:

'20-30, 100--200, 400-500'

I would like to create a function that parses this out and inserts the
results into a temp table with a structure similar to the following:

Min      Max
20       30
100     200
400     500

That way I can create a SQL joining my table (MYTABLE) with the
temporary table (TEMP) as follows:

select mytable.*
from MYTABLE mt,
       TEMP t
where mt.field between t.min and t.max

Please, help
Mehmet Baserdem - 27 Apr 2006 17:24 GMT
Check out

http://www-128.ibm.com/developerworks/db2/library/techarticle/0303stolze/0303sto
lze1.html


Credits to Knut Stulze

Regards,

Mehmet Baserdem
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.