Joao,
I use SQL Select to load lots of arrays in the systems I develop. The trick is to concatenate an unusual sting with the character you are searching for.
Example:
select a.name, '//' + a.key ;
from a.thistable ;
into a_searchit
then, search your incoming data (do use a udf!), passing the string,
and making your search concatenate the '//' in:
m.s_key = '//' + m.passed_parm
m.res_srch = ascan(a_searchit, m.s_key)
blah, blah, blah
You could use any unique string to guarantee success.
I use lots of arrays, make the first column the one I want the user
to see in a drop_down_listbox, and the key prefixed with a unique string
as the second column of a multi-column array.
Be sure to use a_subscript to get the row/column located!