Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Newbie Question on Function
Hi,
I am trying to have a function return a sequence.Nextval but it just doesn't work!
1st I created the Sequence (This worked OK) The sequence Name is: DEPTID_SEQ
Then I created the Function but I get compile errors Here two of my tries (I tried dozens):
CREATE OR REPLACE FUNCTION "CSS_User".DEPID2
RETURN INTEGER IS
BEGIN
RETURN(DEPTID_SEQ.NEXTVAL) ;
END ;
I also tried
CREATE OR REPLACE FUNCTION "CSS_User".DEPID2
RETURN INTEGER IS
A_INT NUMBER(10,0) ;
BEGIN
select DEPTID_SEQ.nextval
into A_INT ;
Return(A_INT) ;
END ;
Can someone tell me What I am doing wrong please ???
eric
ejodoin_at_inetex.com
Received on Mon Jul 20 1998 - 18:22:17 CDT
![]() |
![]() |