I have a query with the following syntax:
select x.a as a, x.b as b, x.c as c
from
(select distinct a from foo
order by y) as x
left join zzz....
left join yyy...;
I want to add order byan external selection to the statement.
attaches it to the end - he does not like the syntax and puts it in front of what appears to be a valid syntax, but returns an empty result set when omitting order bynecessarily returns the results.
Any theories?
Sorry for the variable names, but they are not very important - this is more about the placement order byI'm worried about.
source
share