TomIRL: SQL Statement

Beitrag lesen

Hallo Zusammen!

Was mach ich hier falsch?
UPDATE AVEKBRSFITR a, AVCODFIL_V b SET a.BU_DEF_DVP = 0 where a.FILNR2    = b.FIL_NR2 and
b.TYP       = 'A' and
a.TRANCHE   = 1 and
a.RSN_EKBRS = 1414

danke für eure hilfe!
mfg stefan

BVersuche Dir doch mal klar zu machen ob das Statement dem entspricht was Du erreichen willst:
Da oben steht:
Verändere die Tabelle AVEKBRSFITR (was ist das eigentlich für ein beknackter Name, da kann man sich doch was übersichtlicheres suchen.)und die Tabelle AVCODFIL_V,
Und zwar wie folgt:  a.BU_DEF_DVP = 0
Also nur das eine Feld soll verändert werden?
Und dann kommen Deine Bedingungen:
a.FILNR2    = b.FIL_NR2 and

b.TYP       = 'A' and
a.TRANCHE   = 1 and
a.RSN_EKBRS = 1414

Erscheint Dir das logisch?
Mir nicht..
Wie das Update Statement korrekt verwendet wird, steht hier:

http://dev.mysql.com/doc/mysql/de/UPDATE.html

TomIRL