Integret function with table
648508Sep 2 2009 — edited Sep 2 2009I have created this sequence
CREATE SEQUENCE COUNTRY_SEQ
START WITH 1
MAXVALUE 9999999
MINVALUE 0
NOCYCLE
NOCACHE
ORDER;
Now i want to generate alphanumeric sequnce no,
so for that i have create trigger.But in java trigger is not working directly.Now we think to work on function
I have created function also but i am confused how to use this function while I am inserting in table.
My function is
like
CREATE OR REPLACE FUNCTION ss_thresh
RETURN NUMBER AS
lSeq NUMBER(9,2);
BEGIN
select COUNTRY_SEQ.NEXTVAL into lSeq
from dual;
RETURN 'COUX'||TO_CHAR(lSeq, 'fm0999999') ;
END ss_thresh;
is it true.And i dont know how to integret this function with my table