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!

generating varchar2 value from sequence

user128573147 hours ago

I'm using Oracle Apex 24.1.2. I work on app written by someone else. I have the following field in my table Projects2: "BUSINESS_ID" VARCHAR2(64) NOT NULL ENABLE. This field is hidden and not visible on the form. I have created a sequence to populate it automatically when users enters rest of the data in the form:

CREATE SEQUENCE "BUIS_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 20210009 CACHE 2 NOORDER NOCYCLE NOKEEP NOSCALE GLOBAL ;

However when I try to update rows from the form I get an error:

  • ORA-01400: cannot insert NULL into ("SZZTST"."PROJECTS2"."BUSINESS_ID")

I think the problem may be that sequence is a number and the field is varchar2 (which I can't change). How can I convert this field to varchar2?

Comments
Post Details
Added 7 hours ago
1 comment
28 views