Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
UPDATE
tab1
JOIN
tab2
ON tab1.mnr =tab2.mnr
SET
s1='2017'
WHERE
s1 IS NULL
OR s1 = ''
select t.mnr, t.s1 as value, 's1' as col
from tab1 t
union all select t.mnr, t.s2 as value, 's2' as col
from tab1 t
union all select t.mnr, t.s3 as value, 's3' as col
from tab1 t
| mnr | value | col |
| 201701 | 2014 | s1 |
| 201702 | 2012 | s1 |
| 201703 | | s1 |
| 201701 | 2015 | s2 |
| 201702 | | s2 |
| 201703 | | s2 |
| 201701 | | s3 |
| 201702 | | s3 |
| 201703 | | s3 |
update
tab1 t1,
tab2 t2
set
t1.s1 = ifnull(t1.s1, t2.wert),
t1.s2 = case
when t1.s2 is null and not t1.s1 is null
then t2.wert
else t1.s2
end,
t1.s3 = case
when t1.s3 is null and not t1.s2 is null
then t2.wert
else t1.s3
end
-- TODO: Weitere Felder analog hinzufügen
where
t1.mnr = t2.mnr
and t2.wert > 10;
UPDATE
tab1 t1,
tab2 t2
SET
t1.s1 = ifnull(t1.s1, 2017),
t1.s2 = CASE
WHEN t1.s2 IS NULL AND NOT t1.s1 IS NULL
THEN 2017
ELSE t1.s2
END,
t1.s3 = CASE
WHEN t1.s3 IS NULL AND NOT t1.s2 IS NULL
THEN 2017
ELSE t1.s3
END
-- TODO: Weitere Felder analog hinzufügen
WHERE
t1.mnr = t2.mnr
AND t2.wert > 10;
and t1.s1 <> 2017
and t1.s2 <> 2017
and t1.s2 <> 2017
-- TODO: Weitere Felder analog hinzufügen