2
aufnr varchar(12) NOT NULL default '',
3
plnfl varchar(6) NOT NULL default '',
4
vornr varchar(4) NOT NULL default '' primary key,
5
xstatus_vor int NOT NULL default '0'
7
INSERT INTO t1 VALUES ('40004712','000001','0010',9);
8
INSERT INTO t1 VALUES ('40004712','000001','0020',0);
9
UPDATE t1 SET t1.xstatus_vor = Greatest(t1.xstatus_vor,1) WHERE t1.aufnr =
10
"40004712" AND t1.plnfl = "000001" AND t1.vornr > "0010" ORDER BY t1.vornr