Is there a way to set value of alias isApprover
by checking on another column by or e.g. (if the Control.ApproverID
or Process.TApprover
has a value then set the alias with true value)
Here are the two columns:
cast(case
when max(isnull(Process.TApprover,0)) = :MemberId
then 1
else 0
end as bit) as isApprover,
cast(case
when max(isnull(Control.ApproverID,0)) = :MemberId
then 1
else 0
end as bit) as isApprover,