MarkMpn / Sql4Cds

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

Error on Distinct #528

Closed daryllabar closed 2 months ago

daryllabar commented 2 months ago

Trying to run this query:

SELECT DISTINCT [From] FROM email 

Getting this error

Msg 10337, Level 16, State 1, Line 9
An unexpected error occurred.

System.ArgumentNullException: Key cannot be null.
Parameter name: key
See the Execution Plan tab for details of where this error occurred
MarkMpn commented 2 months ago

Interesting - can you please try this as a workaround for now?

SELECT DISTINCT [From] + '' FROM email 
daryllabar commented 2 months ago

That appears to work.