case,cast

UPDATE dbo.Dat_Camera SET Cam_Config='<xml><cam><type>2</type>'
+CASE WHEN Cam_DX_VideoId is NOT NULL  THEN
  '<naming>'+CAST(Cam_DX_VideoId AS NVARCHAR(128))+'</naming>' END
+'</cam></xml>'  
 WHERE CamId=1020184

posted @ 2016-07-12 22:37  change_4_now  阅读(175)  评论(0编辑  收藏  举报