Riley Waterhouse Limited
Skip to content
  • Home
  • Blog
  • About

Month: March 2013

SQL – rounding to nearest 5

Posted on March 19, 2013October 20, 2014 by Kev Riley

Had a requirement to round some price values to the nearest £5 in a SQL stored proc. It’s easy to round to the nearest 10 using a negative value for the length parameter of the ROUND function i.e. returns 10 returns 20 but length must be of type tinyint, smallint, or int; so you can’t Read more about SQL – rounding to nearest 5[…]

Posted in Database Development, SQL Server, TSQLLeave a comment

Recent Posts

  • New home for session content
  • Closed answer technical tests and when ‘it depends’ isn’t an option
  • Building a string of values in T-SQL
  • Trusting Constraints
  • Helping the Query Optimizer with Constraints

Recent Comments

    Archives

    • October 2018
    • September 2018
    • March 2017
    • February 2017
    • December 2016
    • October 2016
    • June 2016
    • January 2015
    • November 2014
    • October 2014
    • April 2013
    • March 2013
    • May 2012

    Categories

    • Career
    • Community
    • Database Development
    • Powershell
    • Productivity
    • SQL Server
    • SSDT
    • SSRS
    • TSQL

    Recent Posts

    • New home for session content
    • Closed answer technical tests and when ‘it depends’ isn’t an option
    • Building a string of values in T-SQL

    Search

    55 Manor Road, Clayton-le-Woods, Chorley, Lancashire, PR6 7JR
    [email protected]
    +44(0)7808721595
    • Facebook link
    • Twitter link
    • LinkedIn link

    © Riley Waterhouse Limited 2018
    Icons by icons8.com

    Zelle Lite Developed by ThemeIsle