467,915 Members | 1,260 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

Value Truncates When Using Float Datatype

Hi all,

Below is my query which truncates the value of the float variable. I have no clue why it truncates. Can anyone help me out?


Declare @myValue Float
set @myValue = 0.00456456676577567
Print @myValue


Thanks,
Aads
Sep 5 '08 #1
  • viewed: 1567
Share:
2 Replies
ck9663
Expert 2GB
Can you use decimal instead of float?

Expand|Select|Wrap|Line Numbers
  1. Declare @myValue decimal(20,20)
  2. set @myValue = 0.00456456676577567
  3. Print @myValue
  4.  
-- CK
Sep 5 '08 #2
Yeah I can use decimal instead of float. Thanks a lot! It works!


Regards,
Aads
Sep 8 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

12 posts views Thread by Francois Grieu | last post: by
7 posts views Thread by dotnetnoob | last post: by
6 posts views Thread by ryanselk | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.