Autor Beitrag
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: So 29.06.03 01:45 
Hi,

kann mir jemand einen SQL-Befehl sagen, wie ich gleichzeitig mehrere Tabellen update ?

_________________
Gruß
Hansa
kiwicht
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1021

Win 7, MacOS
Delphi x, VBA, PHP, ...
BeitragVerfasst: So 29.06.03 09:59 
Hallo hansa,

hast du es mal "comma-separated" probiert?

ausblenden Delphi-Quelltext
1:
2:
SQL.Text := 'UPDATE tab1, tab2, tab3 SET tab1.feld1 = text1, tab2.feld1 = text, tab3.feld1 = text3'
SQL.ExecSQL


Ist jetzt nur so eine Idee von mir, kann natürlich sein das das ausgemachter gequirlter Blödsinn ist :)

mfG
majolo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 334

Ubuntu 8.04, WinXP Prof.
D1, D6Pers, D7 Prof., D8 Prof., D2005 Pers
BeitragVerfasst: So 29.06.03 13:40 
Versuchs mal damit(habs nicht ausprobiert):
ausblenden Delphi-Quelltext
1:
UPDATE TABELLE1, TABELLE2 SET SPALTE= 'GEÄNDERTER EINTRAG';					


Gut, dass ändert jetzt alle einträge einer Spalte auf den neuen Eintrag, aber dies ist ausbaubar. Ich denke auf jeden Fall,dass die Einträge mit Kommatas verknüpft werden müssen.

_________________
Gruß
majolo