Forum Discussion
Anonymous
5 years agoNot applicable
ODBC SQL incorrect syntax near '='
Hello, I am trying to run this SQL using ODBC connection in Power Query: SELECT
IIF(column1 = 'C', Left(column2,10), '') AS 'Column3'
FROM table But keep getting the following error:...
negi007
5 years agoCommunity Champion
Anonymous your sql syntext seems to be correct. You can test your sql code at below
https://www.eversql.com/sql-syntax-check-validator/
if you have access to query browser of the DB, you may try running query there to check if it is working fine at DB end or not.
SELECT
IIF(table1.column1 = 'C', Left(table1.column2, 10), '') AS 'Column3'
FROM
table1