Skip to Main Content

APEX

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!

how to generate and non-numeric sequence

slavanawayAug 29 2006 — edited Aug 31 2006
I am sure this is a dumb question. I haven't done development for years but I actually like the ApEx tool and hope to use it for several small projects.

I have a change request need and the users want to have a user friendly sequence number that is the fical year + four digit sequence number (e.g FY06-0001). The users will actually be able to submit the request online and the number will be assigned to them when they "save" the basic CR data.

I tried to put this in the default and source pl/sql boxes

'FY06-'||TO_CHAR(cr_fy06_seq.nextval)

I also tried to do just a select cr_fy06_seq.nextval from dual;

no luck. I get some weird errors.
1. default; pl/sql expression
error: ORA-06550: line 1, column 56: PLS-00357: Table,View Or Sequence reference 'CR_FY06_SEQ.NEXTVAL' not allowed in this context ORA-06550: line 1, column 7: PL/SQL: Statement ignored

2. Default: pl/sql function body
error: ORA-06550: line 1, column 52: PLS-00103: Encountered the symbol "|" when expecting one of the following: := . ( @ % ; ORA-06550: line 1, column 84: PLS-00103: Encountered the symbol "RETURN"

I am not a sql developer, but I have a fairly extensive background in dev so any help would be appreciated.

Sam
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 28 2006
Added on Aug 29 2006
5 comments
823 views