Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join 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.