Support Article
Unable to refer to integer property in RDB
SA-43347
Summary
RDB-List to query an external sybase database. In the where clause of the SQL refers to an integer property.
The query works when the integer value is hardcoded, but when the property is referenced {.acct_id} which is integer, an error is thrown.
Error Messages
There was a problem getting a list: code: 257 SQLState: 42000 Message: Implicit conversion from datatype 'VARCHAR' to 'INT' is not allowed. Use the CONVERT function to run this query.
Steps to Reproduce
Run a simple select clause pointing to sybase db.
Root Cause
When the prepare statement is being process quotes are added around the property value resulting in the error.
Resolution
Perform the following local-change:
Either one of these options can be used for an INTEGER database column
From:
where TestInteger= {.TestInteger}
To:
where TestInteger= {.TestInteger Integer}
or
where TestInteger= {ASIS:.TestInteger}
Published December 5, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.