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:...
Anonymous
5 years agoNot applicable
Hi,
"," in the end of the statement could be the cause of error. Try this
SELECT
IIF(column1 = 'C', Left(column2,10), '') AS 'Column3'
FROM table
Thanks!
- Anonymous5 years agoNot applicable
Hi Anonymous ,
Thanks for the help. I removed the "," in the end and still get the same error. The error shows for something with the "=".
Vivek
- Anonymous5 years agoNot applicable
Well in that case, what's the datatype of Column1?
- Anonymous5 years agoNot applicable
AnonymousThe datatype is text for Column1