basically the logic of this code is what I need into the format of an sql select query:
declare @start as int;
declare @end as int;
declare @entries as int;
set @start = 1;
set @entries = (length(#prompt('List','String')#) - length(replace(#prompt('List','String')#, ',')))+1;
for i = 1 to @entries
@end = instr(#prompt('List','String')#,', ',@start)-1;
if i = @entries
then
SELECT (substr(#prompt('List', 'String')#,@start,@end)) Asset FROM Dual
else
SELECT (substr(#prompt('List', 'String')#,@start,@end)) Asset FROM Dual union
end
@start = @end + 2;
next