Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2008
    Posts
    55

    Unanswered: Data Type Decimal ??

    Hello Everyone,

    I am creating a table on SQL Server. One of the columns in this new table contains whole integer as wells as decimal values (i.e. 4500 0.9876). I currently have this column defined as Decimal(12,4). This adds 4 digits after the decimal point to the whole integers. Is there a data type that will have the decimal point only for decimal values and no decimal point for the whole integers?

    Thank you in advance for any input you have!

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    The storage of data is a database issue, and that needs to be uniform for the entire column. This is a truly "one size MUST fit all" setting.

    The display of the data is another matter. Your client tools can display the data as they see fit.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Aug 2008
    Posts
    55
    Thank you for the explaination, Pat Phelan!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •