|
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]
|