Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Implemetation of 'distinct' keyword with analytical function

630982May 5 2008 — edited May 5 2008
Hi All,

i have some problem ----- implementing of 'DISTINCT' ketword with analytical questions.
i requesting you all, anybody help me out




c_9450 – Column name
qdb.asset_text_screen_long - table

this first query is giving me output of 6 rows--- what i want

1) SELECT DISTINCT c_9450
FROM qdb.asset_text_screen_long
WHERE upper(c_9450)
LIKE upper(CASE 7 WHEN 8 THEN '(UK)%' WHEN 5 THEN '(UK)' ELSE
c_9450 END)
AND catsearch(c_9450,'(\(UK\))'||'*',NULL)>0




this second query i am getting some wrong result,
i am unable to implement 'DISTINCT' keyword with analytical function like row_number().
please suggest me solution for this

2)SELECT *
FROM(SELECT row_number() OVER (ORDER BY c_9450) rec_num,
c_9450
FROM qdb.asset_text_screen_long
WHERE upper(c_9450)
LIKE upper(CASE 7 WHEN 8 THEN '(UK)%' WHEN 5 THEN '(UK)' ELSE c_9450 END)
AND catsearch(c_9450,'(\(UK\))'||'*',NULL)>0 )
WHERE rec_num BETWEEN 1 AND 10
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 2 2008
Added on May 5 2008
9 comments
770 views