Often when I convert a decimal number to a string in T-SQL, I want the simplest version of the number. I really don't want any trailing zeroes (i.e. at the end of the number).
In our free SDU Tools for developers and DBAs, we added a function to do just that: TruncateTrailingZeroes.
The function just takes one parameter: the number to be processed.
You can use our tools as a set or as a great example of how to write functions like these.
Find out more
You can see it in action in the main image above, and in the video here:
Access to SDU Tools is one of the benefits of being an SDU Insider, along with access to our other free tools and eBooks. Please just visit here for more info: