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
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
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