Results 1 to 4 of 4

Thread: decimals in sql

  1. #1
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Unanswered: decimals in sql

    hi all this might be a silly question, but I imported the data from an access database to sql server. the problem is that the data in access is in decimal format but when I get it on sql it changes a .5 to 1 when it needs to stay as a .5
    the users need to record [earned hours] .5 format or .10 or .6
    and for some reason when I try to put the changes to .5, it changes to 0. can someone help please. is that the decimal data type
    for example when I caluate the data on a report it comes out 79 instead of 79.5
    can someone tell me what I am doing wrong
    Last edited by desireemm; 10-01-09 at 22:48.

  2. #2
    Join Date
    Feb 2009
    Posts
    51
    Hi desireemm
    here is my 2c.
    sql server table the column definition for decimal must be given the correct precision and the scale.
    when importing the data precision and the scale may have something to do.

    if it is one off import I might as well import it as a different data type may be nvarchar and later change it to decimal.

    report may need to specfy correct output format.

    regards
    .......
    She drank beer with Coke Cola
    and that's the way I like it...
    .......

  3. #3
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    thank yoiu Decimal datatype took care of it

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Quote Originally Posted by desireemm
    thank yoiu Decimal datatype took care of it

    D'oh

    "The message you have entered is too short"
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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