update statement help

  • I have this statement and want to update the a.upn_id with the value of b.upn_id

    SELECT * FROM PS_ITEM_MFG_UPN_FS A, PS_HM_UPC_CODE B

    WHERE A.SETID=B.SETID AND A.MFG_ITM_ID=B.INV_ITEM_ID AND A.UPN_ID<>B.UPN_ID

    thanks

  • twdavis-893252 (7/10/2012)


    I have this statement and want to update the a.upn_id with the value of b.upn_id

    SELECT * FROM PS_ITEM_MFG_UPN_FS A, PS_HM_UPC_CODE B

    WHERE A.SETID=B.SETID AND A.MFG_ITM_ID=B.INV_ITEM_ID AND A.UPN_ID<>B.UPN_ID

    thanks

    Presumably you are asking for help writing the query.

    Please test this first:

    update a

    set upn_id = b.upn_id

    from PS_ITEM_MFG_UPN_FS A

    ,PS_HM_UPC_CODE B

    where A.SETID = B.SETID

    and A.MFG_ITM_ID = B.INV_ITEM_ID

    and A.UPN_ID <> B.UPN_ID

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply