Before you start editing the variable that contains those values you might need to investigate the current assigned length of the variable and the lengths of the contents. If you replace single characters such as ( and ) with (" or ") then the assigned length gets longer. If you do not have sufficient space remainging in the variable then the result will likely get truncated.
Example: variable X has property of length 52 and the current value is: (select x,y,z where a.abc = (NEW) and b.xyz = (OLD)). That contains 52 chracters. If you attempt to assign a new value of
(select x,y,z where a.abc = ("NEW") and b.xyz = ("OLD"))
then there are now 56 characters and 4 will not fit. The result is likely to be
(select x,y,z where a.abc = ("NEW") and b.xyz = ("OL
which is likely to not be the desired result.
... View more