To update only those rows which have corresponding STORY_ID in the STORY_PRODUCT_MAP, you only need to add a simple additional WHERE statement:
update news_storytest set PRODUCT_LOCATION_ID =
(select NEW_PRODUCT_LOCATION_ID from story_product_map
where story_product_map.STORY_ID = news_storytest.story_id)
where exists
(select NEW_PRODUCT_LOCATION_ID from story_product_map
where story_product_map.STORY_ID = news_storytest.story_id)
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?