Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Incorrect syntax in the SQL statement generated by Direct Query

'Creating a slicer that filters multiple columns' solution from Marco (link) works great with Import storage mode.
Unfortunately, same desing based on DQ table (on Azure SQL Database) returns an error:
Incorrect syntax near ')'.. The exception was raised by the IDbCommand interface.

DQerror.png


After reviewing generated query, it is clear that the search condition is missing in the last JOIN. There are only brackets after ON keyword at the end of SQL statement:

)
AS [semijoin1] on 
(

)
)
GROUP BY [semijoin1].[c12]

Query returns syntax error due to the missing code.


I was able to fix it in the management studio by adding missing part of the join and with that, query worked and returned expected values:

)
AS [semijoin1] on 
(
basetable0.c10 = semijoin1.c10
)
)
GROUP BY [semijoin1].[c12]


I was using 2.85.985.0 64-bit version.


Cheers,

Raf

Status: New
Comments
v-yuta-msft
Community Support

@Anonymous ,

 

Should be a bug, could you please share a sample file with onedrive for business so that I could do further analysis?

 

Regards,

Jimmy Tao

Anonymous
Not applicable

Hi Jimmy,

 

Sure thing. Here you go:
Link

I've added a page to the report with sql statements to create source table and populate it with sample data.

Thanks for looking into it.

Cheers,
Raf

Anonymous
Not applicable

Hi @v-yuta-msft ,

Please let me know if you need anything else.

 

Cheers,

Raf