This content has been marked as final.
Show 1 reply
-
1. Re: Error executing sql query with order by case when...
shawkins Jul 24, 2013 12:48 PM (in response to skethire)We are not allowing a unrelated expression (a ordering column that does not appear in the select clause) when grouping (or any non-simple select) is used. I believe this comes from the specification although it is something that can obviously be relaxed but would require an enhancement.
In this specific case we would prefer the use of an explicit null ordering:
select "V_DIM_JOB"."JOB_ID" as "c0" from "BIRTView"."V_DIM_JOB" as "V_DIM_JOB" group by "V_DIM_JOB"."JOB_ID" order by "V_DIM_JOB"."JOB_ID" ASC NULLS FIRST
In general you could also use inline views.
Steve