Hi,
Not sure if what I'm trying to do is possible but:
Basically, if "reply" is a number, set id to reply. Otherwise, run a query to find the value. It's this part I'm not sure is possible, and if so, what the syntax is.
Thanks
Not sure if what I'm trying to do is possible but:
Code:
update t1 a
set id =
case
when (isnumeric(reply) = 1) then reply
else (select id from t2 b where b.email = a.reply)
end
Basically, if "reply" is a number, set id to reply. Otherwise, run a query to find the value. It's this part I'm not sure is possible, and if so, what the syntax is.
Thanks