Re: [GENERAL] Remove duplicate rows

2007-01-11 Thread Bruno Wolff III
On Thu, Jan 11, 2007 at 18:51:57 +0100, Jiří Němec <[EMAIL PROTECTED]> wrote: > Hello, > > I need to remove duplicates rows from a subquery but order these > results by a column what is not selected. There are logically two > solutions but no works. > > SELECT DISTINCT sub.foo FROM (SELECT ...)

Re: [GENERAL] Remove duplicate rows

2007-01-11 Thread Russell Smith
Jiří Němec wrote: Hello, I need to remove duplicates rows from a subquery but order these results by a column what is not selected. There are logically two solutions but no works. SELECT DISTINCT sub.foo FROM (SELECT ...) AS sub ORDER BY sub.bar ERROR: for SELECT DISTINCT, ORDER BY expressions

[GENERAL] Remove duplicate rows

2007-01-11 Thread Jiří Němec
Hello, I need to remove duplicates rows from a subquery but order these results by a column what is not selected. There are logically two solutions but no works. SELECT DISTINCT sub.foo FROM (SELECT ...) AS sub ORDER BY sub.bar ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in sele