Query in AX with SQL functions

Hi guys,

who can i make below query in AX

select year(joindate), count(worker) from employment group by year(joindate)

You can’t use SQL functions such as year() in X++ queries, therefore you’ll have to look for a workaround. What’s your version of AX? (Please don’t forget to mention the version, because different versions have different features.)

i am using AX 2012 R2 RTM

You could create a view with year() in a computed column.