locked
How to convert int data type to accept decimals RRS feed

  • Question

  • Hi All,

    A previous developer had created a field in the database that can only accept int data types. However, we now have a need to enter data into this field that has decimal places upto 2 decimal places.

    What would be the best data type to use for this purpose and how can i change this data type in my table?

    Any guidance is highly appreciated.

    Thanks

    Tuesday, May 3, 2016 3:59 PM

Answers

  • ALTER TABLE TableName
    ALTER COLUMN ColumnName DECIMAL(10,2) or whatever size you need.

    Andy Tauber
    Data Architect
    The Vancouver Clinic
    Website | LinkedIn

    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

    • Marked as answer by Nimish_Patil Tuesday, May 3, 2016 6:53 PM
    Tuesday, May 3, 2016 5:48 PM