SQL does not exist Error

0
When I run this SQL, I got the following error: How do I fix this?I don't know how to CAST. SQL: SELECT cmpny_id,la_stut_dprc_rt_cdis_deleted FROM Test$Test WHERE cmpny_id = {cmpny_id} AND is_deleted = {is_deleted} AND la_stut_dprc_rt_cd IN (11,22)   Error: Exception: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: org.postgresql.util.PSQLException: ERROR: function la_stut_dprc_rt_cd in(integer, integer) does not exist ヒント: No function matches the given name and argument types. You might need to add explicit type casts.
asked
2 answers
1

Hi fujii,

query is correct but i guess it could be because of unintended spacesl try this

SELECT cmpny_id, la_stut_dprc_rt_cd, is_deleted FROM Test$Test WHERE cmpny_id = {cmpny_id} AND is_deleted = {is_deleted} AND la_stut_dprc_rt_cd IN (11, 22);

answered
1

SQL recognizes

la_stut_dprc_rt_cd IN 

as a function because you have a "ideographic space" between la_stut_dprc_rt_cd and IN. If you copy & paste this text into notepad you get to see this:

image.png

 

Replace it with a regular space, and your SQL-query will be fine.

answered