Hello everyone, the following query doesnt work in sqlce. It works in sqlserver2k, but in sqlce 2.0 not!

SELECT uuidEncomenda
FROM Encomendas
WHERE Encomendas.dtEncomenda = (SELECT MAX(dtEncomenda) FROM Encomendas)

And gives the following error:

FAILED: SELECT uuidEncomenda
FROM Encomendas
WHERE Encomendas.dtEncomenda = (SELECT MAX(dtEncomenda) FROM Encomendas)

Error: 0x80040e14 DB_E_ERRORSINCOMMAND
Native Error: (25501)
Description: There was an error parsing the query. [Token line number,Token line offset,,Token in error,,]
Interface defining error: IID_ICommand
Param. 0: 3
Param. 1: 33
Param. 2: 0
Param. 3: SELECT
Param. 4:
Param. 5:

Basicaly, in this query i want to retrieve the less older row from the table.

There is any alternative query?

Thank you a lot!