suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

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)