+ Reply to Thread
Results 1 to 2 of 2

Thread: simple query issue

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    20

    simple query issue

    I am write a query that updates a date only if the group im updating has a LINE_CD of 50 , i tieed that so far
    Code:
    UPDATE EMPLOYER  
    SET EMPLOYER_ADDL.GTL_UW_APPRV_DT = EMPLOYER_ADDL.DNTL_UW_APPRV_DT 
    WHERE EXISTS
        ( 
          SELECT EMP_PLAN_LINE_INFO.LINE_CD
          FROM EMP_PLAN_LINE_INFO
          Where EMP_PLAN_LINE_INFO.GR_NBR = EMPLOYER_ADDL.GR_NBR and
           EMP_PLAN_LINE_INFO.LINE_CD = 50
         )

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Posts
    35
    Please try that code :
    Code:
    UPDATE ea  
    SET ea.GTL_UW_APPRV_DT = ea.DNTL_UW_APPRV_DT 
    FROM EMPLOYER_ADDL ea
        INNER JOIN EMP_PLAN_LINE_INFO ei ON(ei.GR_NBR = ea.GR_NBR)
    WHERE 
    ei.LINE_CD = 50

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts