1
votes

I'm having a peculiar problem when I try to upload data from a file into a Oracle Apex 5 (version: 5.0.0.00.31) table.

I created a table view script

CREATE TABLE projects ( projectid NUMBER NOT NULL, proj_name VARCHAR(45) NOT NULL, proj_client VARCHAR(35), CONSTRAINT pk_projectid PRIMARY KEY (projectid) );

But when I go to submit the csv comma delimited file data

"Inventory tracking for tire company","ACE Tire Company" "Sales order processing for retail business","Book World" "Project management and activity tracking","Digital Images" "Production management","ACME Manufacturing" "Art gallery inventory","Aurora Gallery" "Work order processing for auto shop","Auto Pros"

I get this error : Photo of Error stating that "1 Error Occurred, There are NOT NULL columns in db.PROJECTS. Select to upload the data without an error.

ProjectID must be Not Null because its the primary key and it uses a sequential number, the others can be changed to allow Nulls but this still won't upload.

Is there a way around this besides manually entering data?

1
Do you have sequence already defined, are you using trigger to update sequence? - kapiell
Yes, I'm not sure why I didn't post that CREATE SEQUENCE projectid_seq START WITH 100; I went back into my csv and added the ID numbers manually, performed the import and it uploaded successfully. I'm not sure why it won't work without me having to perform that extra work. - CookeK
You are right, I tried this too and it does not work. It should pick up sequence automatically .. - kapiell
Oracle Documentation on Data Workshop suggests we should be prompted by wizard to select primary column and sequence, link - kapiell
It's weird because the only wizard that appears is the column mappings. I wonder if this was fixed in the 5.1 release. - CookeK

1 Answers

0
votes

You're trying to insert data into a table that has a NOT NULL column and your CSV doesn't have anything for that column. So of course it's going to raise that error. That's what's supposed to happen.

I suggest you do an ALTER TABLE to drop the relevant constraints, upload your data, then add the constraints back.