Question

i have some formula:

CONCAT((SUM(X.lot_qty)-SUM(X.reject))/SUM(X.accept)*100,'%') AS Acceptance

but i get result like:

100.0000%

how to get result as 100.00%?

Was it helpful?

Solution

You can use the MySQL ROUND function as:

CONCAT(ROUND((SUM(X.lot_qty)-SUM(X.reject))/SUM(X.accept)*100,2),'%') AS Acceptance
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top