Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Integret function with table

648508Sep 2 2009 — edited Sep 2 2009
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 30 2009
Added on Sep 2 2009
10 comments
820 views