Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Float Data Type Problem

Author  Topic 

misterzr
Starting Member

49 Posts

Posted - 2005-11-03 : 14:24:50
I have a table with 2 Float type columns. One I have no problem with the query finding what it needs(IHDOCO), the other seems to be doing some kind of rounding?(IHDOC) They are both set to 8 digit length and the only difference between the two is the one that doesn't return the right data has data with 7 digits where the other is 6 digit

The query is

SELECT IHDOC,IHDOCO,IHDCTO,IHIVD,IHAN8
FROM PRODDTA.F5542561
WHERE IHDOC LIKE '%124%'
and IHDOCO LIKE '%894%'


The data returned is


IHDOC IHDOCO IHDCTO IHIVD IHAN8

1251237.0 598945.0 SO 105299 271.0
1251238.0 598947.0 SO 105299 525.0

X002548
Not Just a Number

15586 Posts

Posted - 2005-11-03 : 14:28:05
It's not often you see LIKE with Numeric Data...

What are you actually trying to do, that some math wouldn't be a better predicate?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page
   

- Advertisement -