我们正在从 excel 源获取数据并保存在临时表中,并使用带有存储过程的临时表更新目标表。我在目标表中遇到“评论”列的问题,如果有新评论出现,那么它应该预先添加到现有评论. 这里的谜语是目标表列是输入参数和一些字段以及注释的组合。例如:
[Target.Comments] = '[Manager ' + @Getdateparameter +'' + uploaded by + '] ' +Temp.comments + '' + Target.comments.
当今天有新纪录出现时,
Comment = [Manager1 May_9_2013 uploader1] robert is in canada
如果您在另一天再次运行并且评论中没有更新(它应该检查现有评论),那么
Comment = [Manager1 May_9_2013 uploader1] robert is in canada
如果 5 月 15 日的评论中有更新,那么应该是
Comment = [Manager1 May_15_2013 uploader1] robert is moved away from canada and now he is in US.[Manager1 May_9_2013 uploader1] robert is in canada
如何做到这一点?谢谢。