I am contacting you regarding an issue I have encountered while creating a linked table in Microsoft Access for a PostgreSQL VIEW and executing a specific SQL query, which results in an error, and I would like to inquire about the cause of this error.
OS:windows10
PostgreSql Version :14.7
odbc Cersion :PostgreSql Unicode 16.00
soft :Microsoft Access for office 365 (16.012624.20422) 32bit
The SQL query that causes the error is as follows:
SELECT left(stest_v_test_a.A1,3) AS leftkansu, stest_v_test_b.A1
FROM stest_v_test_a LEFT JOIN stest_v_test_b ON stest_v_test_a.A1 = stest_v_test_b.A1
WHERE left(stest_v_test_a.A1,3)='123';
When executing the above query, an error message appears stating, "ODBC--call failed. ERROR: syntax error at or near ")"; Error while executing the query (#1)."
I suspect that the ODBC driver is unable to understand the use of the LEFT function in the WHERE clause after performing a LEFT JOIN. If the issue lies with the ODBC driver, I kindly request that it be corrected.
I greatly appreciate your assistance in this matter.
![](/media/maillist_attaches/pgsql-odbc/2024/04/1/202404010604.431645Mp001223@p1.tcnet.ne.jp/6852930E8D35408E81F28760F85EF9F0.png)
![](/media/maillist_attaches/pgsql-odbc/2024/04/1/202404010604.431645Mp001223@p1.tcnet.ne.jp/6661F742D52540BA81ED717A744FEFFB.png)
![](/media/maillist_attaches/pgsql-odbc/2024/04/1/202404010604.431645Mp001223@p1.tcnet.ne.jp/E4B6D062062449F8AC834759B2A1F910.png)