Hello,
In sql server i need to update a single column based on the condition using
case statement..
I need to concat the reason to my reason column every time when the condition fails
I tried like this....
update tbltemp set reason=
case
when len(abc)>17 then reason.concat(reason,'abc not valid')
when len(def)>100 then reason.concat(reason,'def not valid')
else ''
end
at the end i need to display reason like 'abc not valid,def not valid'
if the two conditions fails.
For the above query iam getting error like this:
Cannot find either column "reason" or the user-defined function or aggregate "reason.concat", or the name is ambiguous.
Thanks for any help in advance..