题目
有如下一组数据G0706
希望得到如下结果:
即只取状态为FULL的DOCNUM,如果有同时为NOFULL的DOCNUM则不取。
测试数据
CREATE TABLE G0706
(
DOCNUM INT,
STATUS VARCHAR(26)
)
INSERT INTO G0706 VALUES (33,'FULL')
INSERT INTO G0706 VALUES (33,'NOFULL')
INSERT INTO G0706 VALUES (34,'FULL')
INSERT INTO G0706 VALUES (35,'FULL')
INSERT INTO G0706 VALUES (35,'NOFULL')
INSERT INTO G0706 VALUES (36,'FULL')
INSERT INTO G0706 VALUES (37,'FULL')
INSERT INTO G0706 VALUES (38,'FULL')
INSERT INTO G0706 VALUES (38,'NOFULL')