cancel
Showing results for 
Search instead for 
Did you mean: 

Product Suggestion: Please implement collections (arrays)

Former Member
3,059

Another Oracle feature that I would like see added to is some sort of collections in the procedure language. The ability to have arrays at a minimum would be very beneficial. Oracle's collection handling is very robust with arrays of records, nested tables, non integer indexes that can be indexed on, and more.

I had a case the other day where I had 24 integer variables and need to programatically adjust some of them. Without an array, I had to write a case statement that looked at my index and operated on the correct variable. I was converting code that was using a GT table, so even with the case statement the code was much faster than what I was converting. But it would have been a couple of lines in a loop from 1 to 24, and ended up being a long case statement.

Arrays can also reduce the number of parameters that are used. In the example above I was passing the 24 variables to a stored procedure because I wanted to encapsulate the logic, as it was spread in multiple places throughout the application.

We port a lot of code back and forth between the 2 environments and the more features that are in the SQLA language the better. A lot of really good stuff has been going on with SQL Anywhere over the past few years, but the programming language has remained somewhat static.

Former Member

I always figured the reason arrays weren't implemented was because you can use a table like an array. (Mind you, I didn't come to that conclusion until I spent two weeks trying to figure out how to pass an array to a stored procedure.)

Accepted Solutions (1)

Accepted Solutions (1)

MarkCulp
Participant

The ARRAY and ROW data type has been implemented in SQL Anywhere version 16 - see the What's New in Version 16 documentation for more information.

Answers (1)

Answers (1)

Breck_Carter
Participant

[placeholder answer]