Re: Union question

From: Maxim Demenko <mdemenko_at_gmail.com>
Date: Tue, 15 Jul 2008 22:00:55 +0200
Message-ID: <487D01F7.8000003@gmail.com>


Terry Dykstra schrieb:
> If you really need the results to be in a specific order, I would add an
> extra sort indicator:
>
> select '1' sortcode, colx, ...
> from mytable
> union
> select '2' sortcode, colx, ...
> from mytable
> select '3' sortcode, colx, ...
> from mytable
>

But that of course will retain duplicates ( if any ) in different subsets, which otherwise will be eliminated by union. From the other side, the followups seems to indicate, some kind of analytics are more appropriated to solve the original task, but still the requirements are not very clear...

Best regards

Maxim Received on Tue Jul 15 2008 - 15:00:55 CDT

Original text of this message