I'm trying to JOIN two tables in a DataBricks Notebook. The first line in the SQL statement is erroring-out.
I can't determine why. The docs I've read say its typically due to a typo. But that is not the case for me (at least not that I can see).
Error in SQL statement: ParseException:
no viable alternative at input 'WITH mgt '(line 1, pos 8)
== SQL ==
WITH xxx AS(
--------^^^
This can be caused by characters that look like ordinary space (0x20), but are something different. Unicode has quite a lot of them and it happens, especially on copy-paste, that some weird formatting corrupts SQL query string.
For example:
Why did that occur? We can discover by looking at exact byte representation of SQL:
Marked sequence is
0xE28080- which is En Quad, not a space. You can backspace it and type again to fix it.