I am trying to execute one SQL, which is made up of bind variables. It's working fine with ORACLE DB but not with DB2
Here is the sample SQL: (UPPER/UCASE it can be anything)
SELECT Col1 FROM tab1 WHERE Col1 = 'abc' AND (UPPER(Col1) LIKE (UPPER(:1) || '%' ESCAPE '\') ORDER BY 1
Error is as follows:
db2 => SELECT Col1 FROM tab1 WHERE Col1 = 'abc' AND (UPPER(Col1) LIKE (UPPE
R(:1) || '%' ESCAPE '\') ORDER BY 1
SQL0104N An unexpected token "1" was found following "". Expected tokens mayinclude: "<IDENTIFIER>". SQLSTATE=42601
I am not sure, what is the problem here. Its not prompting for input bind value. In Oracle DB, everything is working fine.
In DB2, I used command line to execute the query. For Oracle, I used ORACLE SQL developer.