List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:September 16 1999 5:12pm
Subject:Re: Enumerating rows and cumulating values
View as plain text  
On Wed, 1999-09-15 18:53:58 -0500, Manuel Coral A. wrote:
> On Mon, 13 Sep 1999, Martin Ramsch wrote:
[...]
> > But please, THIS IS NOT MEANT AS A SERIOUS ANSWER, because it's much
> > easier and faster to calculate the columns 'num' and 'cumulated' on
> > your application side, as Sinisa wrote.  The query above is more like
> > a hack ... just for your amusement. ;-)
[...]
> [...] at this moment I don't have the all understand of your select
> sentence ( remember I am a new user..:-) ), but I try to use this
> since I need to do something like the final success of this sentence
> do.

Oh my god, I maybe never should have posted this query ...
PLEASE, don't use my query for any other use as playing around!!!
(And please never use queries you don't fully understand, either!)

It is very inefficient due to the cross join, it's maybe not portable
because it relies on true being 1 and false being 0, and it's
difficult to get right (my example was slightly wrong, correction see
my next mail).
So in short: it's a bad (but funny) query!  (Aren't bad things funny
most of the time ... ;-)

PLEASE, do the row counting and cumulating sums on the application
side!  It's dead easy to do so, it's very fast, and it's hard to do it
wrong!

Regards,
  Martin
-- 
Martin Ramsch <m.ramsch@stripped> <URL: http://home.pages.de/~ramsch/ >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26  E4 EC 80 58 7B 31 3A D7
Thread
Smybolic Links as dataRobert Canary23 Aug
  • Re: Smybolic Links as dataJim Faucette23 Aug
  • Re: Smybolic Links as dataThimble Smith23 Aug
  • Re: Smybolic Links as dataRobert Canary23 Aug
    • Re: Smybolic Links as dataThimble Smith23 Aug
  • Enumerating rows and cumulating valuesDino25 Aug
    • Enumerating rows and cumulating valuessinisa25 Aug
    • Re: Enumerating rows and cumulating valuesMartin Ramsch13 Sep
      • Re: Enumerating rows and cumulating valuesManuel Coral A.16 Sep
        • Re: Enumerating rows and cumulating valuesJames Manning16 Sep
          • Re: Enumerating rows and cumulating valuesMartin Ramsch16 Sep
        • Re: Enumerating rows and cumulating valuesMartin Ramsch16 Sep