Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Kellerassel
Contributor III
Contributor III

ERROR with MySQL: The value '32805' could not be converted to type integer(2-bytes)

 I want to execute a Query in MySQL filtering by date. 

 

SQL SELECT *
FROM
`my_database`.`my_table` 
WHERE
date >= '2021-12-08'

 

 

But I get this error: 

 

ERROR: The value '32805' could not be converted to type integer(2-bytes)

 

 

This query works if I run it directly in our MySQL-Database, it works if I run it on QlikView and it works on any other table executed from Qlik Sense. But it doesn't work on this specific table executing from Qlik Sense. 



What can be the reason for this?


Info: Field "date" is of type "date".

Labels (2)
3 Replies
marcus_sommer

Did you try it without the where-clause? The occurring error may not have a relation to the date-field else any other field may have a conflict between the stored data and their data-type and how the driver tries to handle it.

- Marcus 

Kellerassel
Contributor III
Contributor III
Author

It works without the 'Where'-clause. 

Turned out, that the error occurs only when I included a specific column (let's call it "ID", type smallint(5) ) in the selection AND filtered by date. If I filtered by date but excluded ID it worked, if I included ID but didn't filter by date it worked also. But together, then I get the above error.

The solution was to multiply ID by 1 inside the SELECT statement. Then it suddenly worked.

It's not really a solution, more a workaround. 

Maybe you know what's up with that.

marcus_sommer

I think your multiplying means a conversion into another data-type so that the driver doesn't handle it anymore as smallint. Your used driver may not recognize this data-type and/or interpreting it differently in any way. Therefore you may look if this driver could be configured in any way or maybe there are alternativ drivers available.

- Marcus