Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
calvinfoo
Posting Yak Master
129 Posts |
Posted - 2010-11-17 : 23:15:16
|
| [code]UPDATE PR_headers SET remark = remark + 'new text' WHERE ID = 123[/code]It doesn't work if the remark is null, please advisep/s: SQL Server 2005remark is nvarchar(Max) |
|
|
chadmat
The Chadinator
1974 Posts |
Posted - 2010-11-18 : 00:27:11
|
| UPDATE PR_headers SET remark = isnull(remark,'') + 'new text' WHERE ID = 123-Chad |
 |
|
|
calvinfoo
Posting Yak Master
129 Posts |
Posted - 2010-11-18 : 00:30:42
|
quote: Originally posted by chadmat UPDATE PR_headers SET remark = isnull(remark,'') + 'new text' WHERE ID = 123-Chad
Thanks. Managed to find out the solution and the answer is same as your suggestion. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-11-18 : 07:11:01
|
| Reason is NULL is not regarded as a value under default conditions. So concatenation with NULL yields only NULL------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|