DB2 - Problem description
Problem IT38182 | Status: Closed |
ORDER BY COLUMN ALIAS ASC NULLS FIRST FAILS WITH SYNTAX ERROR | |
product: | |
DB2 FOR LUW / DB2FORLUW / B50 - DB2 | |
Problem description: | |
This is easy to reproduce: SELECT current_date "C1" FROM SYSIBM.SYSDUMMY1 order by "C1" ASC nulls first SQL0109N The statement or command was not processed because the following clause is not supported in the context where it is used: "NULLS". SQLSTATE=42601 but SELECT current_date "C1" FROM SYSIBM.SYSDUMMY1 order by 1 ASC nulls first works. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * See Local Fix * **************************************************************** | |
Local Fix: | |
Specify the column number instead of the column alias. | |
Solution | |
Workaround | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * See Local Fix * **************************************************************** | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 30.08.2021 05.10.2021 05.10.2021 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |