
update xcid set 
xcid_birthcountry_xcou_id=(select distinct xpdc_born_xcou_id from xpdc where xpdc_xcms_id=xcid_id and nvl(xpdc_born_xcou_id, 0) > 0), 
xcid_birthstate_xsta_id=(select distinct xpdc_born_xsta_id from xpdc where xpdc_xcms_id=xcid_id and nvl(xpdc_born_xsta_id, 0) > 0), 
xcid_wtwn_id=(select distinct xpdc_born_wtwn_id from xpdc where xpdc_xcms_id=xcid_id and nvl(xpdc_born_wtwn_id, 0) > 0)
where xcid_id in (select xpdc_xcms_id from xpdc);


