how to generate and non-numeric sequence
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