You can translate the question and the replies:

PHP ODBC Binding issue with numbers/integers

Closely related to this question: https://community.denodo.com/answers/question/details?questionId=9060g000000TQpWAAW&title=ODBC+binding+parameters Binding any type of date, datetime, varchar or char seems to work. however when doing integer or decimal numbers, I receive the below error in PHP PDO. We are running PHP7.3, Denodo version 7 with a PostgreSQL backend. We've also tracked the server with logging enabled however the statement didn't even seem to hit the server. ``` DebugPDOStatement Object ( [queryString] => SELECT * from rds_homt_public_shipped_orders where ordernumber = :ordernumber ) SQL: [77] SELECT * from rds_homt_public_shipped_orders where ordernumber = :ordernumber Params: 1 Key: Name: [12] :ordernumber paramno=0 name=[12] ":ordernumber" is_param=1 param_type=1 Array ( [0] => [1] => 7 [2] => ERROR: Error executing query. Total time 0.285 seconds. QUERY [VIRTUAL] [ERROR] QUERY [JDBC WRAPPER] [ERROR] QUERY [JDBC ROUTE] [ERROR] Received exception with message 'ERROR: operator does not exist: in java.sql.SQLException: Error executing query. Total time 0.285 seconds. QUERY [VIRTUAL] [ERROR] QUERY [JDBC WRAPPER] [ERROR] QUERY [JDBC ROUTE] [ERROR] Received exception with message 'ERROR: operator does not exist: in; Error while executing the query (SQLExecute[7] at ext\pdo_odbc\odbc_stmt.c:258) [3] => ) ``` If I 'translate' the ordernumber column which is of type integer to text using CAST, it works: ``` SELECT * from rds_homt_public_shipped_orders where CAST(ordernumber AS TEXT) = :ordernumber ``` Seems that for some reason it is trying to translate the integer value to string. What I also find strange is that the ERROR message is cut off after X many characters. Is there anything you can do to help us? Thank you, Patrick
user
17-01-2020 10:14:25 -0500

1 Answer

Hi, Sorry for letting you wait for an answer. At this point, I like to suggest you the following. I can recommend you to try debugging this issue by using either the [Denodo Monitor](https://community.denodo.com/docs/html/browse/latest/vdp/administration/monitoring_the_virtual_dataport_server/denodo_monitor/denodo_monitor) or by setting the trace level for some loggers to a finer granularity and then to check the log files. For instance, you can follow the knowledge base article [Using logcontroller and useful log categories](https://community.denodo.com/kb/view/document/Using%20logcontroller%20and%20useful%20log%20categories?category=Operation) to check for useful log details. Based on the information you find there, you might find some information what is going on when querying the view. I can additionally recommend to check the Execution Trace following the description [Trace Viewer](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/installation_and_execution/launching_the_virtual_dataport_administration_tool/trace_viewer) of the Virtual DataPort Administration Guide. You might want to compare the execution trace of the queries once using the CAST function and once without the CAST function to check for differences. Hope this helps!
Denodo Team
22-01-2020 06:23:18 -0500
You must sign in to add an answer. If you do not have an account, you can register here