Click to See Complete Forum and Search --> : regular expression


Claudiu
02-05-2003, 07:07 AM
Are regular expressions implemented or is there any way of simulate a regular
expression in Oracle 9i ?
Example :
this original structure :
if a > b then
-- do something with a
else
-- do something with b
end if;

would become :
a > b ? a : b (jsut like in C)

Keshav
02-05-2003, 07:50 AM
Hi Claudiu,
You can use CASE statement ( A new conditional statement Intoduced in Oracle
9i It is similer to Decode SQL command )
CASE
WHEN a > b THEN
DBMS_OUTPUT.PUT_LINE('a Is Greater Than B ');
WHEN a > c THEN
DBMS_OUTPUT.PUT_LINE('a Is Greater Than C');
ELSE
DBMS_OUTPUT.PUT_LINE('a is not greater than a and b ');
END CASE;




"Claudiu" <cfurcoi@yahoo.com> wrote:
>
>Are regular expressions implemented or is there any way of simulate a regular
>expression in Oracle 9i ?
>Example :
>this original structure :
>if a > b then
> -- do something with a
>else
> -- do something with b
>end if;
>
>would become :
>a > b ? a : b (jsut like in C)
>