Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Evaluation of Logical expression
Replace 'C' logic characters '&&', '||' with 'AND' ,'OR'
Then use 'execute immediate' statement.
Example:
C_logical_expression:= '(1>0) && (2>6)'
logical_expression:=
replace(replace(C_logical_expression,'&&','AND'),'&&','OR')
execute immediate
'select nvl(max(1),0)
from dual where
'|| logical_expression
into tmpn ;
if tmpn = 1 then
successful!!!!
end if;
Alexander
-----Original Message-----
From: Sadashiva [mailto:a_at_b.c]
Posted At: Wednesday, April 11, 2007 3:13 PM
Posted To: server
Conversation: Evaluation of Logical expression
Subject: Evaluation of Logical expression
Hello,
I need to evaluate a logical expression (for e.g..: '(1>0) && (2>6)' )
stored as varchar in one of my tables. The logical expression is of
standard
'C' language syntax.
Is there any standard function available in Oracle?
Has anyone implemented any such logic?
Thanks,
Sadashiva
Received on Wed Apr 11 2007 - 09:28:01 CDT
![]() |
![]() |