Convert Null to zero in access database

前端 未结 2 798
一向
一向 2021-01-24 22:28

Considering that Grade.firstExam, Grade.secondExam, and Grade.finalExam are all TEXT and not numbers, i can\'t get the exact solution to convert null values

2条回答
  •  再見小時候
    2021-01-24 22:53

    You are getting this message error probably because you are using the VB function from inside the SQL request:

    mySQLRequest = "SELECT ..., NZ(yourNumber,0), ..."
    

    the NZ function is not understood by the database engine

    You should write down your request this way:

    mySQLRequest = "SELECT ..., IIf([myField] Is Null,0,[myField]) as myField, ..."
    

提交回复
热议问题