Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Only seen using the Access.Database connector. The bug causes Query Folding to erroneously add the condition "where 0 = 1" to the SQL query so no rows are returned.
To reproduce the issue:
The incorrectly folded query looks like the below. The error is on the last line, "where 0 = 1"
select [_].[ID],
[_].[Title],
[_].[Custom]
from
(
select [_].[ID] as [ID],
[_].[Title] as [Title],
switch(
[_].[ID] MOD 2 = 0 and [_].[ID] MOD 2 is not null, true,
1, false
) as [Custom]
from [Table1] as [_]
) as [_]
where 0 = 1
If you use any values other than 0 for false and -1 for true, the query will fold correctly, e.g:
select [_].[ID],
[_].[Title],
[_].[Custom]
from
(
select [_].[ID] as [ID],
[_].[Title] as [Title],
switch(
[_].[ID] MOD 2 = 0 and [_].[ID] MOD 2 is not null, -2,
1, -1
) as [Custom]
from [Table1] as [_]
) as [_]
where [_].[Custom] = -1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.