Hi Team,
Please let me know if there is any way of using sequnce in a select statement with order by clause.
something like this :
Sequence Creation Script:
Create Sequence seq_emp
Minvalue 1 Maxvalue 999999999999999999999999999
INCREMENT BY 1 START WITH 2500 NOCACHE NOORDER NOCYCLE ;
Query having issue
select empno,ename,sal,hiredate,seq_emp.nextval
from emp order by hiredate;
The following is the error message :
ORA-02287: sequence number not allowed here
02287. 00000 - "sequence number not allowed here"
*Cause: The specified sequence number (CURRVAL or NEXTVAL) is inappropriate
here in the statement.
*Action: Remove the sequence number.
we have similar statement which we are using in our migration related procs.
Any help most welcome
Regards