>
>Hi Dmitry,
>
>Remove parenthesis around CATEGORY in the SELECT list, it makes the column reference to be treated as an expression. Note that ORDER BY first looks for columns in tables and only then for columns with alias in result. It finds CATEGORY in MYTABLE. DISTINCT requires this column to be in SELECT list, but query processor fails to find it because it is "wrapped" as an expression. We will consider to fix this issue.
>
>Thanks,
>Aleksey.
Hi Aleksey,
Thank you for the explanation and for the suggestion. Now I understand why when I changed to ORDER BY 1, the error disappeared.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham