Money data type problem

  • I am having trouble trying to select data that is in a money data type that has this '.0000' amount and I want to select everything greater than that amount and it's still giving me that '.0000' amount in my SELECT statement. It's driving me nutts! 😀

  • Hello david,

    I would like you to elaborate on that. Do you have 0.0000 valued

    entry in your money column? Are you trying select ... where money_column>0 (or .0000) and still getting .0000 in the result?

    please specify.

    Thanks and regards

    Hitendra

  • Hello david,

    I would like you to elaborate on that. Do you have 0.0000 valued

    entry in your money column? Are you trying select ... where money_column>0 (or .0000) and still getting .0000 in the result?

    please specify.

    Thanks and regards

    Hitendra

  • Hello david,

    I would like you to elaborate on that. Do you have 0.0000 valued

    entry in your money column? Are you trying select ... where money_column>0 (or .0000) and still getting .0000 in the result?

    please specify.

    Thanks and regards

    Hitendra

  • Hello david,

    I would like you to elaborate on that. Do you have 0.0000 valued

    entry in your money column? Are you trying select ... where money_column>0 (or .0000) and still getting .0000 in the result?

    please specify.

    Thanks and regards

    Hitendra

  • Hello david,

    I would like you to elaborate on that. Do you have 0.0000 valued

    entry in your money column? Are you trying select ... where money_column>0 (or .0000) and still getting .0000 in the result?

    please specify.

    Thanks and regards

    Hitendra

  • Yes, that's what I'm trying to do. Select money (.0000)

  • Can you post an example of what's happening? I tried to create your scenario with this code: create table #temp (Descript char(10), Amount money)

    insert #Temp

    select 'Something', 123.25 union all

    select 'Another', 0.0001 union all

    select 'Yet More', 123.2512 union all

    select 'Nohing', 0.0000 union all

    select 'Nil', 0 union all

    select 'ZeroUSD', 0.00

    select * from #Temp

    Select * from #Temp where Amount > 0

    Select * from #Temp where Amount > 0.00

    drop table #temp... and got results as expected:(6 row(s) affected)

    Descript Amount

    ---------- ---------------------

    Something 123.25

    Another 0.0001

    Yet More 123.2512

    Nohing 0.00

    Nil 0.00

    ZeroUSD 0.00

    (6 row(s) affected)

    Descript Amount

    ---------- ---------------------

    Something 123.25

    Another 0.0001

    Yet More 123.2512

    (3 row(s) affected)

    Descript Amount

    ---------- ---------------------

    Something 123.25

    Another 0.0001

    Yet More 123.2512

    (3 row(s) affected)

    Also, since you posted this in the CLR forum, is this actually related to CLR? If so, how?

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply