Re: [GENERAL] ERROR: for SELECT DISTINCT, ORDER BY expressions

2006-06-08 Thread Scott Marlowe
On Wed, 2006-06-07 at 10:09, sergey kapustin wrote: > Hi all! > can anybody say me what's wrong with this query. I just try to take > unique values from table column and print them in random order > > select distinct num from (select 1 as num union select 2 as num union > select 1 as num union sel

Re: [GENERAL] ERROR: for SELECT DISTINCT, ORDER BY expressions must

2006-06-08 Thread Bricklen Anderson
sergey kapustin wrote: Hi all! can anybody say me what's wrong with this query. I just try to take unique values from table column and print them in random order select distinct num from (select 1 as num union select 2 as num union select 1 as num union select 3) t order by random(); ERROR: for

[GENERAL] ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list

2006-06-08 Thread sergey kapustin
Hi all! can anybody say me what's wrong with this query. I just try to take unique values from table column and print them in random order select distinct num from (select 1 as num union select 2 as num union select 1 as num union select 3) t order by random(); ERROR: for SELECT DISTINCT, ORDER