http://stanford.edu/dept/itss/docs/oracle/10g/appdev.101/a97269/pc_04dat.htm#i24497
<http://stanford.edu/dept/itss/docs/oracle/10g/appdev.101/a97269/pc_04dat.htm#i24497>You can use CONTEXT variables for this. Mike On Thu, May 13, 2010 at 1:18 AM, kah <[email protected]> wrote: > Hi All, > > > I have this problem where i am suppose to determine the value of a > variable. > However at design time, I do not know the name of the variable. > > During run time, the variable name will be given and based on the > given variable name, I need to find the value of the specified > variable name. > > > DECLARE > > VARIABLE_NAME VARCHAR2(1000); > VARIABLE1 VARCHAR2(1000):=1; > VARIABLE2 VARIABLE2(1000):=2; > > BEGIN > > VARIABLE_NAME:='VARIABLE1'; > > END; > > In the above example of the value of VARIABLE_NAME is 'VARIABLE1'. > Therefore I need to return the value '1'. > And if the VARIABLE_NAME is 'VARIABLE2', then the value to return > would be '2'. > > I know this can be done using simple if else, however if the number of > Variables is unknown or very large. > Then if else would not do. > > Please advise, thanks > > > -- > You received this message because you are subscribed to the Google > Groups "Oracle PL/SQL" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/Oracle-PLSQL?hl=en -- You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en
