Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2006
    Location
    India Mumbai
    Posts
    248
    Thanks
    13
    Thanked 1 Time in 1 Post

    how to preform search for decimal values greater than .00 - MSSQL

    hi all,
    i am having a table in which i have a column datatype (decimal) .
    Now i want to find all the rows where value in that column is greater than .00 eg if there are 3 rows with values : 50.50 , 11.1 , 12 , 14.01 then query should return me only 50.50 , 11.1 and 14.01.

    Thnaks in advance

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    Code:
    select * from table where (col - truncate(col, 0)) > 0;
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


  •  

    Posting Permissions

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