views:

13

answers:

1

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%?

+2  A: 

You can use the MySQL ROUND function as:

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