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 2008 Forums
 Transact-SQL (2008)
 Strange result

Author  Topic 

NaomiR
Starting Member

1 Post

Posted - 2012-03-12 : 13:10:19
Essentially I'm having difficulty generating a numeric value with a query.

The query in its very (very!) simplest form is:

Select 5/10

Giving a result of 0

If i run:

Select 4.9/10

I get 0.49 as expected.

Can someone explain the logic of this (to a beginner).

Thanks,

Naomi

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-03-12 : 13:15:19
see this

http://sqlblogcasts.com/blogs/madhivanan/archive/2008/01/16/beware-of-implicit-conversions.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -