DB2 update mit inner join

Ich möchte ein UPDATE-statement auf eine DB2-Tabelle mit INNER JOIN
Ich versuche diese

update TABLE1 set FIELDVALUE='text/html' from TABLE1 as T1 
inner join TABLE2 as T2 on T1.PROFILE_ID = T2.PROFILE_ID 
inner join TABLE3 as T3 on T2.MSGTYPE_ID = T3.MSGTYPE_ID 
where T1.NAME='contentType' and T3.NAME='Order';

Ich erwähnen, dass das wählen funktioniert

select * from TABLE1 as T1 inner join TABLE2 as T2 
on T1.PROFILE_ID = T2.PROFILE_ID 
inner join TABLE3 as T3 on T2.MSGTYPE_ID = T3.MSGTYPE_ID 
where T1.NAME='contentType' and T3.NAME='Order';

Dank!

Die version von DB2, auf welcher Plattform? Ich bin mir nicht sicher, ob beliebiger von Ihnen unterstützen die Verwendung von joins - die Lösung ist in der Regel tun, irgendeine Art von Unterabfrage.

InformationsquelleAutor tinti | 2013-03-18

Schreibe einen Kommentar