twdavis-893252
Ten Centuries
Points: 1195
More actions
July 10, 2012 at 10:04 am
#263501
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
Phil Parkin
SSC Guru
Points: 247180
July 10, 2012 at 10:11 am
#1511067
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 BWHERE A.SETID=B.SETID AND A.MFG_ITM_ID=B.INV_ITEM_ID AND A.UPN_ID<>B.UPN_IDthanks
twdavis-893252 (7/10/2012)
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
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply