能一次统计结果否
create cursor b1 (m1 c(2),m2 c(2),m3 c(2),含M数 N(2)) insert into b1 values ("M1","M2","",2) insert into b1 values ("","M2","M3",2) insert into b1 values ("M1","M2","M3",3)
可以用:
REPLACE ALL 含M数 WITH OCCURS('M',m1+m2+m3)
一条语句就统计出结果。
create cursor b2 (m1 N(2),m2 N(2),m3 N(2),及格数 N(2)) insert into b2 values (61,54,72,2) insert into b2 values (48,85,73,2) insert into b2 values (67,72,69,3)
可否像上面那样用一条语句直接统计m1、m2、m3中“>=60”的数到"及格数"中否?