Re: [SQL] variables in SQL??

From: Volker Paul <vpaul(at)dohle(dot)com>
To: Francisco Hernandez <xy0xy0(at)earthlink(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: [SQL] variables in SQL??
Date: 2000-08-16 11:39:24
Message-ID: 399A7D6C.20593252@dohle.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

> what im trying to do is have a Sum of a colum.. as it goes forwards with the
> cursor..
> like so:
>
> Price|Sum
> 5|5
> 4|9
> 10|19
> 2|21
> 7|28

I think what you mean is called running sum, I had the same problem
before, and I found no other solution than creating a column for it,
and calculating its values by a function.

Yours,

V.Paul

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message DalTech - CTE 2000-08-16 12:11:14 Re: variables in SQL??
Previous Message Darrin Ladd 2000-08-16 11:07:51 Fwd: regression test failure on initdb

Browse pgsql-sql by date

  From Date Subject
Next Message DalTech - CTE 2000-08-16 12:11:14 Re: variables in SQL??
Previous Message Mike Baroukh 2000-08-16 10:09:32 Re: lo_export and files permissions