IF Statement with regular expression?
585992Jul 12 2007 — edited Jul 12 2007Hi there,
I'd like to write an IF-DStatement that asks if a string begins with H_ or I_. I tried to realize it with a regular expression, but it seems that they can only be used in ther WHERE-Clausel
My trial looks like that:
FOR l IN links LOOP
IF l.destID = REGEXP_LIKE('^H_') THEN type# := 'hidden';
ELSIF l.destID = REGEXP_LIKE('^O_') THEN type# := 'output';
ELSE dbms_output.put_line('Type error ocurring in procedure backprop');
END IF;
END LOOP;
is there another possibility? Kinda l.destID = ('H_'||%) (do not work either)
I could try some other tricks but that would boost my statement...
Thanks for help!