You are here: Re: Actuarial sql statement Need Help. « MsSQL Server « IT news, forums, messages
Re: Actuarial sql statement Need Help.

Posted by Ed Murphy on 11/15/06 16:23

Erland Sommarskog wrote:

> Twobridge (Twobridge@gmail.com) writes:

>> Sorry let me clarify....if a bill's file date is 1/1/1985 and is paid
>> on 3/3/1985 this causes the datediff function to produce a 3/12 * 12 in
>> my problem.....3/ 12 = 0 * 12....so now my column heading has a value
>> of 0 when in reality it should be grouped as a payment made in the
>> first 12 months. I hope this makes since.

> I'm afraid that I did not understand much. It seems that you have not
> decided what output your query should give in this case, and this is
> nothing we can assist you with in a newsgroup.

Surely "first 12 months" ought to be followed by "second 12 months"
etc., and so
datediff(month, bill.fileDate, transaction.payDate)/ 12 * 12
should be changed to
(datediff(month, bill.fileDate, transaction.payDate)+11)/ 12 * 12

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация