Please helpppp me in this problem

Hi every one
I try to use the top-n analysis in formula coulmn in report but it give me error
for example
select ename from(select rownum,ename from emp order by sal) where rownum<=3;
this in function
this error
if I omit order by no error but I need order by
what is the solution
thanks

I do not have 6i. But i tried in 9i and it works in 9i.
As i am looking the code, you are getting the max sal. Which you can also get by using this code.
function CF_1Formula return Char is
has_maxsal varchar2(50);
begin
select ename
into has_maxsal
from emp
where sal in (select max(sal)
from emp
and rownum = 1;
return has_maxsal;
end;
Hope this helps.

Similar Messages

Maybe you are looking for

  • Design view disappears

    In a template that I am using on a number of pages, I put the <body> tag in a editable region so I can add an onload tag unique to to each page. This works fine when displayed with a server, but in the Display mode of DW I get a blank page. This happ

  • For some reason my Itouch 4 is now randomly downloading games on its own without a password approval. Do u know how this is possible and I can stop it?

    I don't know why but sometimes when I open my Itouch I saw about two games already or are on the process of being loaded onto my Itouch and I have never clicked on the app to download them. Could I be that I have an app that is causing this? And how

  • LDAP BC QUESTION ABOUT OBJECT CLASSES

    Hi i am working with a bpel and its ldap-bc, when i create an entry in my ldap through the bpel it has all the object classes from the attributes i set. for example if i set cn and sn attributes then my entry has the object class person; i want to kn

  • Lower Case File Names on 5D iii?

    Can I modify the filing naming on the 5D iii so that it is all lower case rather than uppercase? If that's not possible, it is at least possible to change the extension from JPG to jpg?

  • Desperately seeking help for displaying image on button

    i wrote the following method to create and display a button with an icon, doesn't work and i cannot figure out what the problem might be and how to fix it, please help me... clo :)) public static void addButton(Container c, String title, ActionListen