Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2002
    Posts
    45

    Unanswered: Which Data Type should i Use to store %

    I need to store a 3 digit value ie: .015

    What is the recommened/ smallest datatype
    for this value?

  2. #2
    Join Date
    Nov 2003
    Location
    denver
    Posts
    11

    Re: Which Data Type should i Use to store %

    I would say the best way to store is numeric(4,3) as your storing only numeric data.

  3. #3
    Join Date
    Dec 2002
    Posts
    45
    Does this take 5 bytes?

    Wouldn't it be smaller to use small money?

  4. #4
    Join Date
    Nov 2003
    Location
    denver
    Posts
    11
    if you are looking for precision then use the numeric datatype else if you are looking for storage and sure abt the preciosn then you can use small money.

  5. #5
    Join Date
    Sep 2003
    Posts
    212
    Check our BOL under 'decimal and numeric' for more info

    but a numberic takes 5 bytes for a precision of 1 - 9

  6. #6
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621

    Re: Which Data Type should i Use to store %

    Originally posted by Will trever
    I need to store a 3 digit value ie: .015

    What is the recommened/ smallest datatype
    for this value?
    You could use even tinyint - just save result multiplied by 1000

  7. #7
    Join Date
    Dec 2002
    Posts
    45

    Re: Which Data Type should i Use to store %

    Originally posted by spatangay
    I would say the best way to store is numeric(4,3) as your storing only numeric data.

    In enterprise manager i can't find how to set it to numeric 4,3?

    I can do this in the database diagram, but when i modify the table in
    desgin view i loose the 4,3 that I set in the diagram view?

Posting Permissions

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