SQL Server Performance

concatenating messages

Discussion in 'General Developer Questions' started by v1rtu0s1ty, Jun 18, 2004.

  1. v1rtu0s1ty New Member

    Hey guys,<br /><br />I have a target table with a field named comment. The comment field is of text datatype. The values in this comment field are of different lenghts too.<br /><br />I have another table which is my source. Let's name dst as target table and src as source table. What I need to do is concatenate some of the src fields to dst.comment field. The result of the concatenated string is placed to dst.comment field. And also, dst.comment is added at the last.<br /><br />This is my query:<br /><br /> update dst<br /> set dst.comment = convert(varchar(10),getdate(),101) + ' ' + convert(varchar(10),getdate(),10<img src='/community/emoticons/emotion-11.gif' alt='8)' /> + ' AUTOUPDATE DCONFIRM ' + convert(varchar(10),src.confdate,101) + ' ' + src.comment + char(13) + char(10) + convert(varchar,dst.comment)<br /> from src<br /> inner join dst<br /> on src.loanno = dst.loanno<br /><br />Can someone give me a better solution, this is one no good.<br /><br />Thanks/<br /><br />

Share This Page