• Jeff Moden - Friday, November 17, 2017 5:47 PM

    ...  If you also want thousands separators in the output, use the following.

    SELECT '$' + CONVERT(VARCHAR(16),CONVERT(MONEY,SUM(ISNULL(ie.AMOUNT,0))),1)

    Jeff... Very nice tip!
    I think 99.99% of topics, where the proposed solution uses the CONVERT function's style parameter, revolve around date & time conversions.
    I'm happy to see it being used in used in a completely different context... It's also a nice (and important) reminder that the BOL doesn't end at the bottom of the Date and Time Styles chart.
    Thank you for that. 🙂