All Forums Database
ysrinu 44 posts Joined 04/07
13 Oct 2008
evaluate expression

Hi,i want to do the following in a stored procedureif (a v_op b) then...end if;where v_op is a variable (can have values like '>=', '<', .....)Again, for expressions likeSET d = a v_op bwhere v_op is a variable (like '+', '-', ...)How to tell teradata to resolve the operator value and then evaluate?Thanks,-srinivas yelamanchili

Adeel Chaudhry 773 posts Joined 04/08
13 Oct 2008

Hello,Perhaps, you can use dynamic SQL for this or you can use CASE statement and check for variable value and perform the task.Regards,Adeel

-- If you are stuck at something .... consider it an opportunity to think anew.

ysrinu 44 posts Joined 04/07
14 Oct 2008

Right now i am using case statement.The expression is part of stored procedure, but not part of any SQL,so not sure how to use dynamic sql here.Thanks,-srinivas

You must sign in to leave a comment.