> > trx_date | trx_time | descriptions|
> > payment_method | debet | credit | creator
> > +--+--+
> >- ---+---+--+-
> > 2003-10-09 | 21:55:02 | Resto Biling : 13,800, Paid : 10,00
On Thursday 16 October 2003 10:37 am, Muhyiddin A.M Hayat wrote:
> > Something like this:
> >
> > select id,db,cr,(select sum(cr-db) from calc sub where sub.id <=
> > calc.id) from calc;
> >
> > This of course assumes that ID indicates the correct order of the
> > entries and it will blow up if you
> Something like this:
>
> select id,db,cr,(select sum(cr-db) from calc sub where sub.id <=
> calc.id) from calc;
>
> This of course assumes that ID indicates the correct order of the
> entries and it will blow up if you allow nulls for cr or db (which
> you shouldn't since that would literally be
There have been several discussions on running totals on this list over the
last couple of weeks. See the archives for possible solutions.
--
-Josh Berkus
Aglio Database Solutions
San Francisco
---(end of broadcast)---
TIP 1: subscribe and un
On Wednesday 15 October 2003 12:59 pm, Muhyiddin A.M Hayat wrote:
> Dear all,
>
> I have below table
>
> +-++-+
>
> | id |db|cr |
>
> +-++-+
>
> |1 |
Dear all,
I have below table
+-++-+
| id |
db
|cr
|
+-++-+
|1
|
| 200
|
|2
| 100