I have two tables like the below one in my DB. In the first table ITEM for evry DEPARTMENT_CODE there will be multiple ITEM_CODE.
ITEM
----------------------------------------------------
"STORE_CODE" "ITEM_CODE" "DEPARTMENT_CODE"
"011" "912003" "14"
"011" "912004" "14"
"011" "914001" "14"
----------------------------------------------------
COMPETITOR
--------------------------------------------------------------
"STORE_CODE" "ITEM_CODE" "DEPARTMENT_CODE" "COMPETITOR_CODE"
"011" "912003" "14" "01"
"011" "912003" "14" "02"
"011" "912003" "14" "03"
"011" "912004" "14" "01"
"011" "912004" "14" "02"
"011" "912004" "14" "04"
"011" "914001" "14" "01"
"011" "914001" "14" "02"
"011" "914001" "14" "03"
-------------------------------------------------------------
In the Table COMPETITOR evey ITEMCODE will have three entries and have different competitor_Code for that
I have three values Comp_1, comp_2, comp_3 and department_code =14;
what i want to do is update COMPETITOR table with comp_1, comp_2, comp_3 for evry Item_code which has department_code as 14 in ITEM table
sample output
COMPETITOR
--------------------------------------------------------------
"STORE_CODE" "ITEM_CODE" "DEPARTMENT_CODE" "COMPETITOR_CODE"
"011" "912003" "14" "Comp_1"
"011" "912003" "14" "Comp_2"
"011" "912003" "14" "Comp_3"
"011" "912004" "14" "Comp_1"
"011" "912004" "14" "Comp_2"
"011" "912004" "14" "Comp_3"
"011" "914001" "14" "Comp_1"
"011" "914001" "14" "Comp_2"
"011" "914001" "14" "Comp_3"
-------------------------------------------------------------
How can i write a single oracle query for this??