Inconsistent results when checking for Null values (Jet DAO vs. ACE DAO)

前端 未结 2 1512
小鲜肉
小鲜肉 2020-12-21 08:33

In a VB6 program accessing an MDB file, the following SQL query is being executed:

> Select * FROM [table1] WHERE ([type] = 1 OR [type] = 2 OR [type] = 6)         


        
2条回答
  •  [愿得一人]
    2020-12-21 09:27

    DAO 3.51 is way outdated. It was replaced by DAO 3.6 many years ago. Use 3.6 instead and then see whether this version of your query returns the same results from both DAO 3.6 and ACEDAO:

    SELECT *
    FROM [table1]
    WHERE
            [type] IN (1,2,6)
        AND ([notes] Is Null OR [notes] = '0')
        AND [date] >= cvdate('09/03/2013')
    ORDER BY [date], [column2];
    

提交回复
热议问题