﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Keith Henry / Article Discussions / Article Discussions by Author  / Filtering data using float column / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 25 May 2013 13:29:20 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Filtering data using float column</title><link>http://www.sqlservercentral.com/Forums/Topic911625-153-1.aspx</link><description>Still not sure what the problem is... your example works just fine:[code="sql"]DECLARE @tbl TABLE(	DATE DATETIME,	amount DECIMAL(10,2),	interest FLOAT)INSERT INTO @tblSELECT '2009-04-10 00:00:00.000', 450.00, 00.23 UNION ALLSELECT '2009-04-10 00:00:00.000', 451.00, -1.20 UNION ALLSELECT '2009-04-10 00:00:00.000', 460.00, 2.5SELECT DATE, amount, interest FROM @tbl WHERE interest &amp;gt; 0 /* result setdate	amount	interest2009-04-10 00:00:00.000	450.00	0,232009-04-10 00:00:00.000	460.00	2,5*/[/code]</description><pubDate>Thu, 29 Apr 2010 09:22:41 GMT</pubDate><dc:creator>LutzM</dc:creator></item><item><title>RE: Filtering data using float column</title><link>http://www.sqlservercentral.com/Forums/Topic911625-153-1.aspx</link><description>Hi,Create table ab(date          datetime,amount      decimal(10,2),interest      float,)data:2009-04-10 00:00:00.000    450.00    00.232009-04-10 00:00:00.000    451.00    -1.202009-04-10 00:00:00.000    460.00    2.5select date, amount, interest from ab where interest &amp;gt; 0 Output:Its showing the all the record. but i need only two records.also i tried below query, but notselect date, amount, interest from abwhere case sign(amount) when -1 then 1 else 0 end = 0Thanks...</description><pubDate>Wed, 28 Apr 2010 21:52:48 GMT</pubDate><dc:creator>stanley 86917</dc:creator></item><item><title>RE: Filtering data using float column</title><link>http://www.sqlservercentral.com/Forums/Topic911625-153-1.aspx</link><description>Here's a sample code that works as expected:[code="sql"]DECLARE @tbl TABLE ( float_column FLOAT )INSERT INTO @tblSELECT 0 UNION ALLSELECT 0.001 UNION ALLSELECT -0.001 UNION ALLSELECT -1110 SELECT  *FROM   @tblWHERE float_column &amp;gt; = 0.0 /* result setfloat_column00,001*/[/code]What values would I need to insert to describe the scenario you're faced with?</description><pubDate>Wed, 28 Apr 2010 12:23:10 GMT</pubDate><dc:creator>LutzM</dc:creator></item><item><title>RE: Filtering data using float column</title><link>http://www.sqlservercentral.com/Forums/Topic911625-153-1.aspx</link><description>Hi,Na. I tried and it wont work. It will bring the negative values too.i checked with case and its working in select clause but not in where clause. thats the problem </description><pubDate>Wed, 28 Apr 2010 04:28:09 GMT</pubDate><dc:creator>stanley 86917</dc:creator></item><item><title>RE: Filtering data using float column</title><link>http://www.sqlservercentral.com/Forums/Topic911625-153-1.aspx</link><description>Maybe something like this?[code="sql"]WHERE float_column &amp;gt; = 0.0 [/code]</description><pubDate>Wed, 28 Apr 2010 03:43:12 GMT</pubDate><dc:creator>LutzM</dc:creator></item><item><title>Filtering data using float column</title><link>http://www.sqlservercentral.com/Forums/Topic911625-153-1.aspx</link><description>how to filter the negative value from the float column</description><pubDate>Tue, 27 Apr 2010 23:25:30 GMT</pubDate><dc:creator>stanley 86917</dc:creator></item></channel></rss>