表1:
字段1 字段2 
null  2000
null  2000

aaa   2100
bbb   2100
null  2100
null  2200
null  2200
null  2300

ccc   2400
ddd   2500
ddd   2000
eee   2600SQL = "select * from 表1 where 字段1 = " & Null     '打开字段1为空的数据
conn4.Execute SQL
下面不知道要怎么写语句统计了当打开后,我还要对字段2进行筛选统计,要想得到字段1为空的记录字段2还有这几个数:2000,2100,2200,2300

解决方案 »

  1.   

    select * from 表1 where 字段1 is null 你最好把结果列出来 你的表述不清楚没看懂
      

  2.   

    字段1 字段2  
    null 2000
    null 2000
    aaa 2100
    bbb 2100
    null 2100
    null 2200
    null 2200
    null 2300
    ccc 2400
    ddd 2500
    ddd 2000
    eee 2600
    null 2200
    null 2300
    ccc 2400
    ddd 2500
    null 2200
    null 2300
    ccc 2400
    ddd 2500
    null 2200
    null 2300
    ccc 2400
    ddd 2500
    null 2200
    null 2300
    ccc 2400
    ddd 2500
    要得到这四个数2000,2100,2200,2300,即字段1是NULL的记录,汇总统计后得知,还有字段2是2000,2100,2200,2300这四个数的记录