Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: HELP with SQL
Michael,
1) execution of the query
select a.ctry_name, b.city_name,
row_number() over (partition by a.ctry_name, b.city_name) rn
from country a, city b where a.ctry_id = b.ctry_id
gave the error...
ORA-30485: missing ORDER BY expression in the window specification
2) execution of the query
select a.ctry_name, b.city_name,
row_number() over (order by a.ctry_name, b.city_name) rn from country a, city b where a.ctry_id = b.ctry_id
gave the output
CTRY_NAME CITY_NAMERN
Canada Ottawa 1 Canada Toronto 2 India Mumbai 3 USA New York 4 USA Phoenix 5 USA Washington6
IN the query(1), as i missing anything????
Thanks,
Anand.
Received on Fri Nov 11 2005 - 04:51:01 CST