1
votes

I would like to ask if exist somehow the native round sql function in X++

For example I would like to do something like this

Select sum(round(colum,2)) from salesLine........

I have a feeling that I am not able to do this with a simple select but only with while Select....with a normal round inside the brackets but I think is a "slow" solution..

Best Regards, Nikos

1

1 Answers

2
votes

You are correct. You'll have to do this with a while select.

You could do select sum(column) from salesLine... then round the salesLine.column value, but that's not technically the same as what you've written, because that does the rounding after the sum() where I think you're rounding before the sum().