Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arrays in DB2?

Status
Not open for further replies.

julen

Programmer
Mar 26, 2006
27
ES
Hi friends,

I would like to know if there is any possibilities of using arrays in DB2 sql.

Or is there any way of doing the same.

Thanks again.
 
I do not believe DB2 supports arrays within sql, although I am not a DB2 SQL expert. What are you trying to accomplish with arrays? You may be able to accomplish the same thing with DB2 temporary tables.
 
Julen,
Like Dan, I believe that SQL does not provide the functionality of an array. The only way that I can see to do this would be to write an SQL procedure in a language that does support arrays and call it from SQL. Be aware though that you cannot pass an array to a stored procedure and if you wanted to do this you would have to pass the array as a varchar and parse it correctly from within the stored proc.

Hope this helps,

Marc
 
An array is surely a Table for developers who don't have the luxury of a database?
 
Well, DB2 supports multi-row fetch. This means that the result of your query is brought to the client/host language as an array.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top