Page 1 of 3 123 LastLast
Results 1 to 15 of 32
  1. #1
    Join Date
    Jul 2003
    Posts
    55

    Angry Unanswered: God Only Knows Why??????

    CREATE TABLE [__1] (
    [n] [int] IDENTITY (1, 1) NOT NULL ,
    [a] [decimal](16, 5) NULL
    ) ON [PRIMARY]
    GO


    INSERT INTO __1
    (a)
    VALUES (1.22115)

    select * from __1

    ----------------------------------------
    RESULTS FROM Query Analyzer
    ----------------------------------------


    (1 row(s) affected)

    n a
    ----------- ------------------
    1.00 1.22

    (1 row(s) affected)

    When I go to the Enterprise Manager and see the data, it appears as

    n a
    ----------- ------------------
    1.00 1.22115


    I am soooo confused!! Highly appreciating your comments...

  2. #2
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393

    Re: God Only Knows Why??????

    try inserting 1.22000

  3. #3
    Join Date
    Jan 2003
    Location
    India
    Posts
    523

    Re: God Only Knows Why??????

    Originally posted by RaedT
    CREATE TABLE [__1] (
    [n] [int] IDENTITY (1, 1) NOT NULL ,
    [a] [decimal](16, 5) NULL
    ) ON [PRIMARY]
    GO


    INSERT INTO __1
    (a)
    VALUES (1.22115)

    select * from __1

    ----------------------------------------
    RESULTS FROM Query Analyzer
    ----------------------------------------


    (1 row(s) affected)

    n a
    ----------- ------------------
    1.00 1.22

    (1 row(s) affected)

    When I go to the Enterprise Manager and see the data, it appears as

    n a
    ----------- ------------------
    1.00 1.22115


    I am soooo confused!! Highly appreciating your comments...
    it gives right results for me.

  4. #4
    Join Date
    Jul 2003
    Posts
    55

    Re: God Only Knows Why??????

    Karolyn:
    After iserting 1.22000, nothing changed!
    the output is still rounded to 1.22

    harshal_in:
    Notice the output from the Query Analyzer. The inserted value 1.22115 was rounded to 1.22, I need the Query Analyzer to give me what really exists in the table 1.22115, not 1.22!!


    Originally posted by harshal_in
    it gives right results for me.

  5. #5
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393

    Re: God Only Knows Why??????

    sorry I've mis-read your pb

    it's the same pb as last week !

    you must have a property or option in your QA that
    rounds up your data

    or maybe you don't see it totally... (?)

    try

    Select '-' + convert(varchar(50),a) + '-' From Table

  6. #6
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    Code:
    CREATE TABLE [__1] (
    [n] [int] IDENTITY (1, 1) NOT NULL ,
    [a] [decimal](16, 5) NULL 
    ) ON [PRIMARY]
    GO
    
    
    INSERT INTO __1
    (a)
    VALUES (1.22115)
    
    select 'Value = '+convert(varchar,a) from __1

    What does this return ???
    Get yourself a copy of the The Holy Book

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

  7. #7
    Join Date
    Jul 2003
    Posts
    55
    Output:
    --------------------------------------
    Value = 1.22115


    ??? What does this mean?


    Originally posted by Enigma
    Code:
    CREATE TABLE [__1] (
    [n] [int] IDENTITY (1, 1) NOT NULL ,
    [a] [decimal](16, 5) NULL 
    ) ON [PRIMARY]
    GO
    
    
    INSERT INTO __1
    (a)
    VALUES (1.22115)
    
    select 'Value = '+convert(varchar,a) from __1

    What does this return ???

  8. #8
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393
    that you don't see the all the numbers of your result

    the column in the QA is too narrow
    maybe there's an option to adapt the witdht of a column

  9. #9
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    Just curious .. whats the version of sql query analyzer are you using ...
    I found no option in QA that does rounding off
    Get yourself a copy of the The Holy Book

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

  10. #10
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393
    Go see TOOLS-OPTIONS in the QA

    in the Result tab there's a number of caracters


    (maybe someone that doen't like you set it to 4)

  11. #11
    Join Date
    Jul 2003
    Posts
    55
    QA Version: 8.00.760
    Max. Characters per column: 256

    Note, even the int type value (1) appears as 1.00




    Originally posted by Karolyn
    Go see TOOLS-OPTIONS in the QA

    in the Result tab there's a number of caracters


    (maybe someone that doen't like you set it to 4)

  12. #12
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393
    At least you've got the good result in the table...
    (Being optimistic)

    Check all the options in your databases and in QA

  13. #13
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    how are you starting up your query analyzer ???

    By clicking on an icon ??? The only thing i can think of is that you might be starting up your qa with some configuration options

    Check your shortcut properties ... the error might lie there
    Get yourself a copy of the The Holy Book

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

  14. #14
    Join Date
    Jul 2003
    Posts
    55
    I am starting my QA from the EM.

    TOOLS=> SQL QA



    Originally posted by Enigma
    how are you starting up your query analyzer ???

    By clicking on an icon ??? The only thing i can think of is that you might be starting up your qa with some configuration options

    Check your shortcut properties ... the error might lie there

  15. #15
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393
    did you find the round-up-property ????

Posting Permissions

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