I am using SQL query to pull some student records from SQL database. I am getting the error Arithmetic overflow error converting expression to data type datetime.
It looks like there is a column for student number which is char(15) type and throwing this error every time I put a letter in front of the student number (we have students with this case).
This works fine
Select * from StudentDataTable where StudentNumber = '123456789'
This throws the error
Select * from StudentDataTable where StudentNumber = 'A12345678'
Any help would be appreciated.