tag:blogger.com,1999:blog-350451041404241419.post4570291922195951509..comments2015-05-28T14:44:07.133+05:30Comments on DevMitra: Convert a number to two decimal places in SQL Server QueryAnonymoushttp://www.blogger.com/profile/03639055175369042090noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-350451041404241419.post-43996766399651602972015-05-27T14:44:05.140+05:302015-05-27T14:44:05.140+05:30Solution 2:
FORMAT(NumberorExpression,'##.##&#...Solution 2:<br />FORMAT(NumberorExpression,'##.##')<br />Disadvantage here using this method 44.440 will be converted to 44.44 but 44.000 will be converted to 44 only.<br />So when there is only zero after decimal then it simply returns the integer value.Anonymoushttps://www.blogger.com/profile/03639055175369042090noreply@blogger.comtag:blogger.com,1999:blog-350451041404241419.post-39352838753979521292015-05-27T14:40:15.931+05:302015-05-27T14:40:15.931+05:30Solution 1:
SELECT CONVERT(DECIMAL(10,2),Number)
R...Solution 1:<br />SELECT CONVERT(DECIMAL(10,2),Number)<br />Replace the number with the expression you want to change to two decimalAnonymoushttps://www.blogger.com/profile/03639055175369042090noreply@blogger.com