Ciao a tutti
Ho un problema con una query (Oracle):
SELECT a.product_id, a.system_id
FROM Desktops a
WHERE a.product_id IN
(
SELECT e.product_id
FROM Desktop e
WHERE e.data >= trunc(sysdate) AND e.venduto = 'SI'
ORDER BY e.data DESC
)
ORDER BY a.system_id DESC
Alla riga della ORDER BY nella SELECT annidata mi genera questo errore:
[1]: (Error): ORA-00907: missing right parenthesis
Togliendo 'ORDER BY e.data DESC' dalla query annidata, non mi genera più nessun errore...
(infatti non si tratta proprio di 'missing right parenthesis'...)
Come mai?
Che poi alla fine l'ordinamento della SELECT annidata é inutile e posso anche non farglielo fare... ma non riesco comunque a capire perché mi genera quell'errore...
Ringrazio tutti in anticipo
Ciao