PDA

View Full Version : SQL update



alexander may
19-07-05, 09:52
Hallo Allerseits,

ich habe eine kleine SQL-Herausforderung.
Ich habe 2 Files, FILEA und FILEB. in FILEA gibt es u.a. ein Statusfeld STAT. Jetzt möchte ich die Werte in diesem Feld für alle Sätze ändern, welche auch in FILEB vorhanden sind.


FILEA

Nr STAT
10 a
20 a
30 a
40 a
50 a

FILEB

Nr
20
30

Hier also in FILEA für satz 20 und 30 den Status ändern.

Vielen Dank für Eure Hilfe!!!

Alexander May

malzusrex
19-07-05, 10:13
Update FileA
set Status = 'blabla'
where nr in (Select nr from FileB)


so mal jetzt aus dem kalten herraus ohne getestet zu haben

tschau ronald

alexander may
19-07-05, 10:27
servus roland,

danke, das wars. hat geklappt!

gruss

alexander may