我有这样的类型声明:
FUNCTION ...
IS
TYPE stati_va IS VARRAY (10000) OF varchar(1);
stati stati_va;
v_counter INTEGER := 0;
BEGIN
stati := stati_va ();
--this is actually in a loop so the array contains more values
v_counter := v_counter + 1;
stati.EXTEND;
stati (v_counter) := '4';
--here I would like to determine if the array 'stati' contains a value
到目前为止,我已经尝试过以下方法,但这给了我一个错误
IF '4' member of stati then <- COMPILE error
IF '4' IN stati then <- COMPILE error
我知道循环遍历数组是可能的,但这有点不方便,因为我需要构建这样的东西:
IF array contains '4' then
elsif array contains '3' then
elseif array contains '2' then
...