It looks to me as if the variable substitution in a TORacleScript differs from the one in SQLPlus. In the TOraclescript the variable seems to be "cleared" after the first use.
Thus
Select EmpName
from Emp
where EmpID = &MyID
Union
Select EmpName
from Old_Emps
where EmpID = &MyID
does not work because the second &MyID will
deliver an empty string ('')
Am i right?
I found a "work around" by defining two variables, filled with the same value. Not a very neat programming though!
Thus
Select EmpName
from Emp
where EmpID = &MyID
Union
Select EmpName
from Old_Emps
where EmpID = &MyID
does not work because the second &MyID will
deliver an empty string ('')
Am i right?
I found a "work around" by defining two variables, filled with the same value. Not a very neat programming though!