Hi
The method you're using is functionally correct and quite efficient if
a little on the verbose side.
Other non-postgres variants of SQL have a DECODE function which
comes in very handy.
I dont believe postgres has any equivalent. (Postgres decode() does
something entirely differnt).
I often
I've a table like:
CREATE TABLE ordiniitem
(
idordine numeric(18,0) NOT NULL,
grupposped smallint,
idart numeric(18,0) NOT NULL,
qevasa integer,
qfuoricat integer,
qinris integer,
qnonpub integer,
qann integer,
qord integer,
qpren integer,
qrichpag integer,
qinriass
When asking for help on non-trivial SELECT queries it really helps to tell
us the version of PG you are using so that responders know what
functionality you can and cannot use. In this case specifically, whether
WINDOW (and maybe WITH) clauses available?
David J.
-Original Message-
On Mon, 16 May 2011 20:05:45 -0400
David Johnston pol...@yahoo.com wrote:
When asking for help on non-trivial SELECT queries it really helps
to tell us the version of PG you are using so that responders know
what functionality you can and cannot use. In this case
specifically, whether WINDOW