Joining Two Tables with Different Data types MS ACCESS - 'type mismatch in expression' error

后端 未结 2 503
迷失自我
迷失自我 2021-01-25 13:46

I\'m trying to run a query on access using two live CSVs which has a common field with different data types(numbers and short text). I\'ve discovered that you can join different

相关标签:
2条回答
  • 2021-01-25 14:31

    OK guys, I've managed to resolve this issue, It turned out to be simple in the end. This is what i did.

    Basically, I re imported the linked table. This time on the import window i clicked on 'advanced' and changed the data type to 'short text' on the 'person ID' column to match with the 'employeeID' data type. And then all problems solved. (I didn't know you could do this)

    Thank you all for your replies. Going through your comments guided me to the right path.

    Much appreciated.

    0 讨论(0)
  • 2021-01-25 14:44

    Try the other way round:

    ON Sixthform_Reg_Year_Groups.Person_id = Val(Students.employeeID)
    

    and/or prevent Null errors:

    ON CStr(Nz(Sixthform_Reg_Year_Groups.Person_id, 0)) = Nz(Students.employeeID)
    
    0 讨论(0)
提交回复
热议问题