Informix - Problem description
Problem IT11666 | Status: Closed |
SORT IN LVARCHAR IS ALWAYS ASCENDING REGARDLESS OF DESC KEYWORD | |
product: | |
INFORMIX SERVER / 5725A3900 / C10 - IDS 12.10 | |
Problem description: | |
When using the DESC keyword in an ORDER BY clause on an LVARCHAR field the sort would still occur in ascending order. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * If query conatins order by lvarchar column with DESC, DESC * * NULLS FIRST, NULLS LAST, ASC NULLS LAST, After sort empty * * lvarchar may report as NULL. * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Update to IBM Informix Server 12.10.xC6 * **************************************************************** | |
Local Fix: | |
Consider a) to cast the LVARCHAR to VARCHAR, like "SELECT * FROM test_table ORDER BY valuetext::varchar(255) DESC ;" or b) create an Index on the LVARCHAR column and use optimizer access-method directives to ensure this index is used. | |
Solution | |
Workaround | |
Turn off 0x20 bit of SQL_DEF_CTRL | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 09.10.2015 28.06.2016 28.06.2016 |
Problem solved at the following versions (IBM BugInfos) | |
12.10.xC6 | |
Problem solved according to the fixlist(s) of the following version(s) |