Describe the bug
The nullability inference seems not to understand De Morgans's laws.
To Reproduce
Assuming there is at least one row in systemuser with a value for fullname and a nickname that is NULL.
select nickname from systemuser
where NOT (fullname is null and nickname is null)
Produces error:
Column 'nickname' does not allow DBNull.Value.
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
Expected behavior
The equivalent:
select nickname from systemuser
where fullname is not null OR nickname is not null
Works fine.
Environment (please complete the following information):
- SQL 4 CDS edition: XrmToolBox
- Results of
SELECT @@VERSION:
Microsoft Dataverse - 9.2.25051.174
SQL 4 CDS - 9.6.1.0
May 02 2025 16:58:10
Copyright © 2020 - 2025 Mark Carrington
Describe the bug
The nullability inference seems not to understand De Morgans's laws.
To Reproduce
Assuming there is at least one row in
systemuserwith a value forfullnameand anicknamethat isNULL.Produces error:
Expected behavior
The equivalent:
Works fine.
Environment (please complete the following information):
SELECT @@VERSION:Microsoft Dataverse - 9.2.25051.174
SQL 4 CDS - 9.6.1.0
May 02 2025 16:58:10
Copyright © 2020 - 2025 Mark Carrington