Low severityquery
Power BI Refresh Error:
102
What does this error mean?
SQL Server's parser found a syntax error in the query at or near the specified token.
Common causes
- 1Missing comma, bracket, or keyword in a dynamically built SQL query
- 2T-SQL syntax used in a non-SQL Server database dialect (e.g. MySQL syntax in SQL Server)
- 3ADF pipeline generates incorrect SQL from a misconfigured query parameter
How to fix it
- 1Step 1: Run the failing query directly in SSMS to see the exact error location. The error message says 'near X' — look just before that token.
- 2Step 2: Use SQL Server's built-in parser to check without executing: SET PARSEONLY ON; <your query>; SET PARSEONLY OFF;
- 3Step 3: For dynamically built queries, print the SQL before executing: PRINT @sql; — then paste it into SSMS to debug.
Frequently asked questions
Official documentation: https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/database-engine-events-and-errors