SQL server 数据同步 Merge 的一个小bug
摘要:
a.Name NVarchar(40)b.Name Varchar(40)MERGEaASTARGETUSING(SELECTid,nameFROMb)ASSOURCEON(TARGET.[id]=SOURCE.[id])WHENMATCHEDANDCHECKSUM(TARGET.Name)!=CHECKSUM(CONVERT(NVARCHAR(40),SOURCE.[Name]))THENUPDATESETTARGET.[Name]=SOURCE.[Name],WHENNOTMATCHEDBYTARGETTHENINSERT([id],[Name])VALUES(SOURCE.[ID],S. 阅读全文
posted @ 2011-07-29 15:07 青春的虎子 阅读(340) 评论(0) 推荐(0) 编辑