MarkMpn / Sql4Cds

SQL 4 CDS core engine and XrmToolbox tool
MIT License
74 stars 22 forks source link

Extra filter conditions showing up in the fetchXML query #530

Closed trobblob closed 2 months ago

trobblob commented 2 months ago

This morning, I noticed that some extra filter conditions were added to my query. I may be wrong, but it seems to me like this is an issue.

image

MarkMpn commented 2 months ago

This is to keep it consistent with SQL semantics - in FetchXML, the ne operator will match a null value as being not equal to SYSTEM, but in SQL you would not expect this to match.

If you use the DISTINCT FROM operator instead of <> it will generate only the expected ne condition and not the additional not-null conditions.

trobblob commented 2 months ago

Thank you, sir!