HI
I'm making a query to an Access database, from Excel using this query "SELECT tblkmsDiarios.Matricula, SUM(tblkmsDiarios.Abastecimento) AS Total, tblMatriculas.UO FROM tblkmsDiarios INNER JOIN tblMatriculas ON tblkmsDiarios.Matricula = tblMatriculas.Matricula WHERE tblkmsDiarios.Matricula<>'OUTRA' GROUP BY tblkmsDiarios.Matricula, tblMatriculas.UO".
The results are what I want and are correct, what I wanted is for them to be ordered by the 'tblMatriculas.UO' field, but in accordance with the following order ('CON' , 'COGP' , 'COCN' , 'COCS' , ' COGL' , 'COS'), these are the values that 'tblMatriculas.UO' can have.
Is it possible to do this by changing the query I have?
Thanks
Bookmarks