title: PL/SQL: ORA-30485: missing ORDER BY expression in the window specification
body: <p>I am compiling this Function but getting ERROR : missing ORDER BY expression in the window specification</p>
  
  <pre><code>  CREATE OR REPLACE FUNCTION  WFir_get_act_section_cd(firnum IN NUMBER,langcd IN NUMBER) RETURN VARCHAR2 
                 as
            ACTSEC  VARCHAR2(1500);
                   BEGIN
                    begin
    --- ERROR START                       
   select ltrim(max(sys_connect_by_path(NVL(act_long,' ') || '/' || NVL(section,' '),',')),',') as FIR_ACT_SEC into ACTSEC from(select NVL(act_long,' ') || '/' || NVL(section,' '), row_number() over() rn from rep_fir_sections sec
                           INNER JOIN m_act a on sec.act_cd = a.act_cd
                           INNER JOIN m_section c on sec.section_cd = c.section_code
                           and FIR_REG_NUM = FIRNum
                           and a.lang_cd = langcd)   WHERE ROWNUM &lt;=1 start with rn = 1
                        connect by prior rn = rn -1;
                        EXCEPTION
                        WHEN NO_DATA_FOUND THEN
                           NULL;
                     end;
                     return ACTSEC;
                  END;
  </code></pre>
  
  <hr>
  
  <p>When we are compiling above function after migrate this function form MYSQL to Oracle i am getting error "missing ORDER BY expression in the window specification" </p>
  
  <p>I don't know why i am getting this ERROR, Please help me to resolve this ERROR </p>