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 2005 Forums
 Transact-SQL (2005)
 Convert Float datatype question?

Author  Topic 

NguyenL71
Posting Yak Master

228 Posts

Posted - 2010-01-11 : 17:13:22
--How can I convert the get the result below?. Thank you in advance.

SELECT (604 * 1.) / CAST(365 AS FLOAT)

-- Result want:
is 1.6547945205479452054794520548.

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2010-01-11 : 18:22:44
maybe this ? SELECT (604 * 1)/ CAST(365 AS decimal(38,0))

<><><><><><><><><><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion
Go to Top of Page

NguyenL71
Posting Yak Master

228 Posts

Posted - 2010-01-11 : 19:01:32
Thank you so much for your help.

L

quote:
Originally posted by yosiasz

maybe this ? SELECT (604 * 1)/ CAST(365 AS decimal(38,0))

<><><><><><><><><><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion

Go to Top of Page
   

- Advertisement -