Is it possible to pass a table name as a parameter when using the Database Connector in Mendix?

0
When using the Database Connector's "Execute parameterized query" feature in Mendix to run SQL queries against a PostgreSQL database, you may encounter issues with making the table name in the query dynamic, such as: SELECT * FROM $1 WHERE timestamp BETWEEN $2 AND $3; Upon investigation, it appears that PostgreSQL does not support passing table names or column names as parameters, only values within clauses like WHERE. Given your goal to dynamically change the table name in the SQL query within Mendix, you may wonder if there is a direct solution using the Database Connector or if it would be more appropriate to build the SQL string using a Java action and execute it that way. To navigate this scenario, I would appreciate your insights on the best approach to handle it, along with any suggestions or examples from someone who has faced a similar situation.
asked
0 answers