Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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.