I have a comma-separated VARCHAR determined dynamically.
varchar cHighRank := (1,2,3,4,5,6,7,8)
I would like to use this in the following IN Clause, but the system produces an error since an IN clause is only for integers:
if (rank in cHighRank) then
--do the high rank...
elsif (rank in cLowRank) then
-- do the low rank
end if;
I have to break a list of integers into parts. It could be 16, 12, etc. But I don't know how many since it is dynamic.
Lowrank: 1,2,3,4,5,6,7,8
HighRank: 9,10,11,12,13,14,15,16
How can I convert a comma-separated VARCHAR to be used in an IN clause?