help with division  
Author Message
quansun





PostPosted: Fri Mar 11 18:47:01 CST 2005 Top

SQL Server Developer >> help with division

Hi,
When I try this I get 0


select 580578/2401132

and ideas?

SQL Server203  
 
 
cbretana





PostPosted: Fri Mar 11 18:47:01 CST 2005 Top

SQL Server Developer >> help with division Yes they're both integers so SQL is doing Integer division.
To get fractions make one of the numbers a Float by adding a decimal point

select 580578/2401132.0

Then the query Processor will do Floating point math



> Hi,
> When I try this I get 0
>
>
> select 580578/2401132
>
> and ideas?