vendredi 11 septembre 2015

Trim decimal to 2 digits

I have this query

SELECT CONVERT(VARCHAR(20),(((currentytd - PreviousYTD) / PreviousYTD) * 100)) + '%' as ytdGrowth from ytd 

It is returning: 11.224300%

I would like to return: 11.22%

I am very new SQL so trying to find the correct way to accomplish this.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire