I'll show what I got working and what I need help, as follows
[works] - Here I'm creating a multiset on the fly, without needing to create a user defined type.
SELECT * FROM TABLE(MULTISET{ ROW(100, 'Kline'), ROW(101, 'Smith'), ROW(102, 'Jones'), ROW(103, 'Brown')}) applicant(aplicantid, lastname) INTO TEMP APPLICANT;
But it only works because the string names have all a length of 5 characters.[doesn't work] If I the strings are of different sizes I'll receive "Type %s not found, code -9628" as in:
SELECT * FROM TABLE(MULTISET{ ROW(10, 'Software Developer') ,ROW(11, 'Business Analyst') ,ROW(12, 'Data Analyst') })
[inadequate solution] I just got able of overcoming the error in the item 2 by casting each row individually
SELECT * FROM TABLE ( MULTISET{ ROW(10, 'Software Developer') :: ROW (x int, y varchar(20) ) , ROW(11, 'Business Analyst') :: ROW (x int, y varchar(20) ) , ROW(12, 'Data Analyst ') :: ROW (x int, y varchar(20) ) } )
. This is extremely frustrating to keep repeating the same casting for all rows.[Example of what I need] I'd need to cast the entire Multiset() at once, or even the table() but without needing to create a user defined type, as I did in the item 3. Example (which doesn't work) =
SELECT * FROM TABLE(MULTISET{ ROW(10, 'Software Developer') ,ROW(11, 'Business Analyst') ,ROW(12, 'Data Analyst') }) :: TABLE(MULTISET{ROW(x int, y varchar(20))})
So all the content would be converted at once.
Ps: please the server don't has datablade modules.
Really thanks.