Hi,
I have a table as below, and I want to create a new column NEW:
Date A/c Balance NEW
1/1/08 ABC 100.00 200.00 (300-100)
1/2/08 DEF 300.00 -100.00 (200-300)
1/3/08 XYZ 200.00 200.00 (0-200)
ie, next row balance minus last row balance. How do i do that?
Thanks,
Dolphin
scubadiver - 29 May 2008 09:02 GMT
SELECT E164src.LiveMonth, E164src.Total AS New, (SELECT Max([Total])
FROM E164src AS temp
WHERE temp.monthID=E164src.monthID+1) AS Old, [new]-[old] as diff
FROM E164src
will do the following:
ID LiveMonth New Old diff
1 Aug 06 1 9 8
2 Sep 06 9 5 -4
3 Nov 06 5
> Hi,
>
[quoted text clipped - 9 lines]
> Thanks,
> Dolphin
scubadiver - 29 May 2008 09:05 GMT
Sorry,
should be
[old]-[new] as diff
> Hi,
>
[quoted text clipped - 9 lines]
> Thanks,
> Dolphin
Jeff Boyce - 29 May 2008 12:36 GMT
The subject line you provide appears to presume you are working in Excel,
not in Access.

Signature
Regards
Jeff Boyce
www.InformationFutures.net
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/
Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
> Hi,
>
[quoted text clipped - 9 lines]
> Thanks,
> Dolphin