Sort on an aggregate
I want to SELECT DISTINCT left(Contract,8) where Contract > "TJU" ORDER BY Contract;
I can't do the ORDER BY clause. How do I order by an aggregate like this?
I want to SELECT DISTINCT left(Contract,8) where Contract > "TJU" ORDER BY Contract;
I can't do the ORDER BY clause. How do I order by an aggregate like this?
Are you running this in Reporting Services? If so, the properties of the table should have a Sort tab that can be changed.
Also try adding Left(Contract,8) to the order by clause.
It's actually the row source clause in a VBA combo box, but I checked and found it's actually a SQL rule, not a VB or VBA rule. It's not allowed in MySQL either. I did try the Left(Contract,8) syntax as well