Nullable bool fields in MS Access linked tables

后端 未结 3 1339
无人及你
无人及你 2020-12-07 02:36

Looks like I\'m not the only one out there with this issue, but there doesn\'t seem to be an anwwer to this problem.

I\'m working in Access 2010, using a linked tabl

3条回答
  •  情话喂你
    2020-12-07 02:59

    I experienced the same problem in my project, where I implement some add-ons in our old ordering system from early 2000's, and boolean is widely used.

    Today I found a solution by using a passthrough query as follows:

    SELECT 
        *,  
        CASE MYFIELD 
           WHEN NULL THEN NULL 
           WHEN 1 THEN 1 
           WHEN 0 THEN 0 
        END AS MYRESULT
    FROM 
        DBO.MYTABLE
    

    This is not updateable but anyway regular SQL statements work there.

提交回复
热议问题