Moin,
ein
PHP-Code:
update datei a set (f1, f2, f3) = (
select f1, f2, F3
from datei b
where a.feld = b.feld and b.xxx=1 and b.datum = (
select max(c.datum)
from datei c
where c.yyy = :wert and ... )
and ... )
where a.f1=' ' and a.f2 = ' ' and a.f3 = ' ' and ...
bricht ab und zu ab, weil es keine passenden Werte in Datei b gibt.
Wenn ich
PHP-Code:
update datei a set (f1, f2, f3) = (
select coalesce(f1, f2, F3
from datei b
where a.feld = b.feld and b.xxx=1 and b.datum = (
select max(c.datum
from datei c
where c.yyy = :wert and ... )
and ... , ' ', ' ', ' '))
where a.f1=' ' and a.f2 = ' ' and a.f3 = ' ' and ...
davon mache, ist die Syntax falsch.
muß ich das "and exists..." mit dem ganzen Gerödel machen oder gibt es eine Syntax die
mit dem coalesce funktioniert?
Danke
der ILEMax
Bookmarks