List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:September 8 1999 5:59pm
Subject:Re: Autoincrement in a query
View as plain text  
Dino wrote:
> 
> Hi All,
> 
> I have a big problem to me:
> 
> I need to query a database having the values cumulated. Something like this:
> 
> Num| Name         | MonthValue | cumulated
> --------------------------------------------------------
> 1  |   aname       |    10               |    10
> 2  |  othername  |     15              |    25
> 3  |  otherone     |     3                |   28
> 
> That row "num" is another question: can I have a enumerated result? How?
> 
> Thanks in advance

Hi Dino

No, you can't cumulate like this in an SQL DB.
So you have to do this on the client side.

The enumeration can be done, but only via inserting the result into a temporary table
which has the Num field as AUTO_INCREMENT.

Tschau
Christian

PS: Sorry for the late answer, I was really busy.

Thread
Porting to new machineTimothy Cardozo21 Aug
  • Porting to new machinesinisa21 Aug
    • Porting to new machineMichael Widenius27 Aug
  • Autoincrement in a queryDino21 Aug
  • Re: Autoincrement in a queryChristian Mack8 Sep
  • Re: Re:innobase bug w/ 3.23.29???Michael Widenius28 Jun
  • Re: Re:innobase bug w/ 3.23.29???ryc29 Jun
Re: Re:innobase bug w/ 3.23.29???Heikki Tuuri28 Jun