Update Query in X++

Hi all,

Do we have alias in x++. Below query works fine in sql but i want to write the below query on a button click event in X++.Please let me know how to proceed with it further.

update i set exhausted = j.cnt from CAELOA i join ( select caeloa,COUNT(caeloa) as cnt from CAESECURITYPROJ group by caeloa)j on i.CAELOA=j.CAELOA


No, AS is not supported. Please consult Select Statement Syntax and update_recordset before continuing.