SQL UPDATE statement with WHERE EXISTS

前端 未结 6 840
天涯浪人
天涯浪人 2021-02-07 10:09

Im trying to write a query that updates a date only if the group im updating has a LINE_CD of 50. Would i do it like this?

UPDATE EMPLOYER_ADDL  
SET EMPLOYER_A         


        
6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-07 10:33

    Try with this also. I think this is new for you ?

    UPDATE ADDL   
    SET ADDL.GTL_UW_APPRV_DT = ADDL.DNTL_UW_APPRV_DT 
    From EMPLOYER_ADDL ADDL
    Inner Join  EMP_PLAN_LINE_INFO INFO on INFO.GR_NBR = ADDL.GR_NBR
    Where INFO.LINE_CD = 50
    

提交回复
热议问题