distinct in use with order by
16310Jul 23 2002 — edited Jul 22 2008Hi guys,
I have a problem using distinct with order by.
This is my code:
select distinct att.STYPID from POI.ASSETREIHE asd,POI.ASSETTYPE att
where asd.STYPID=att.STYPID
and asd.MATCH='fonds'
and asd.DATUM='31.05.2002'
order by att.PRIO
But I become the error: "ORA-01791:not a Selected expression"
How can I solve that problem???
A little other question, how can a delimit that the query gives maximum
3 rows back? Is that possible??
thanxx
Schoeib