| 
	
 | 
 Posted by  DonLi2006 on 09/18/07 15:58 
Beautiful, thank you. 
 
On Sep 18, 9:43 am, "Pall Bjornsson" <pa...@kvos.is> wrote: 
> Hi ! 
> 
> What I can see via quick read are two errors or mistakes. 
> 
> 1) Definition of a variable or result of type decimal(1), can store at the 
> most one total number of digits both to the left and to the right of the 
> decimal point, so you'll never get a result with anything more than a single 
> digit number, even if the result should be 10 or more, in which case you 
> should get an overflow error. 
> 
> 2) The division by the integer number 60 forces the operation to be an 
> integer division, as you can easily see by executing this statement: 
> select datediff(n,'08:00','14:25')/60, 
> 
> convert(decimal(1),datediff(n,'08:00','14:25')/60), 
> 
> datediff(n,'08:00','14:25')/60.0, 
> 
> convert(decimal(1),datediff(n,'08:00','14:25')/60.0) 
> 
> Hope this helps, 
> 
> Palli 
> 
> <DonLi2...@gmail.com> wrote in message 
> 
> news:1190084992.933315.305940@g4g2000hsf.googlegroups.com... 
> 
> 
> 
> > Hi, 
> OP omitted 
> - Show quoted text -
 
  
Navigation:
[Reply to this message] 
 |