I have a query
update quotestable set quotestags= quotestags +', Panchatantra' where quotesid=1374
This works only if quotestags is not null. If it is null then it doesnot update. What is the way around?
You could use:
update quotestable set quotestags= COALESCE(quotestags, '') +', Panchatantra' where quotesid=1374
This replaces the null value with an empty string to concatenate.
By the way, if quotestags is null, the update is still executed, but null + [value] = null, so the effect is identical to the situation before update.
isnull? I always prefer coalesce because it is ANSI, hence more portable.