Re: Re: Sorting Problem
Posted in 2006
If you a recent engine version select the data for ordering in a virtual table (multiset) and select from that.
J.
-----Original Message-----
From: "Henry" <ggk517@gmail.com>
To: informix-list@iiug.org
Date: 3 Aug 2006 01:45:32 -0700
Subject: Re: Sorting Problem
However, i got error while issue this query:
select distinct id from table order by id[2, 6] + 0 desc
SQL Error (-19828)
-19828 ORDER BY column or expression must be in SELECT list in this
context.
The ORDER BY column or expression can not be omitted from the SELECT
list in
the following situations:
* The UNIQUE or DISTINCT operator is used.
* The UNION operator is used.
* The query selects into a temporary table (SELECT ... INTO TEMP).
* In distributed queries that reference servers which always require
ORDER
BY columns to be in the SELECT list.
* Aggregate expressions are only allowed when the query uses the
GROUP BY
clause.
* The expression uses an alias to a column substring.
Revise the SQL statement to follow these rules.
I wish to select distinct data only.
Please help me, thanks.
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list
Jean Sagi
jeansagi@myrealbox.com
jeansagi@gmail.com