1 2 3 4 5 6 7 8 9 10
| update table1 set
champ1 = (select decode(table2.DATE_S,'2004',table2.toto,null) from table2),
champ2 = (select decode(table2.DATE_S,'2005',table2.toto,null) from table2),
champ3 = (select decode(table2.DATE_S,'2006',table2.toto,null) from table2),
champ4 = (select decode(table2.DATE_S,'2007',table2.toto,null) from table2),
champ5 = (select decode(table2.DATE_S,'2008',table2.toto,null) from table2),
champ6 = (select decode(table2.DATE_S,'2009',table2.toto,null) from table2)
where table1.titi= table2.titi
and
table1.tutu = table2.tutu; |
Partager