I am using iWay 5.3 to load an Oracle 9x table. The source data is a PeopleSoft 8.4 table (oracle database).
The problem I am experiencing is with the use of nulls. Both of my tables (source and target) are both defined with all columns as NOT NULL. We did this because of the PeopleSoft side of the equation.
Specifically, I am receiving the following error when loading the Oracle table:
(FOC1574) ASSIGNMENT OF A NULL VALUE TO A NOT NULL COLUMN IS NOT ALLOWED
: ORA-01400: cannot insert NULL into ("SCR_STG"."PCR_SCR_VSRC3"."NAME2")
(FOC1416) EXECUTE ERROR : PCR_SCR_VSRC3
On the PeopleSoft side, NAME2 contains a space (NOT A NULL). Because of this, I am confused as to why the column appears to have a NULL when I insert into the Oracle table.
To get this to work, I had to include the following on the NAME2 column:
IF NAME2 IS MISSING THEN '.' ELSE IF NAME2 EQ ' ' THEN '.' ELSE NAME2;
My question is why does this occur? In the Peoplesoft table the value of the NAME2 column contains a space (if no value is present). Why would the transformation take this to be a null?
I don't know if this will help but have you tried setting MISSING = ON ?
Check out these links:
Is your column PCR_SCR_VSRC3.NAME2 defined as CHAR or VARCHAR2 in Oracle?
I don't directly work with iWay 5.3 but I now about some issues it has when dealing with CHAR columns in Oracle .. somehow, if the field constains only spaces it's treated as empty (and thus converted to NULL) before sending it to Oracle, so when this one receives it what it gets is NULL and that would explain the error. Changing the data type to VARCHAR2 solved the problem (and provided some other significant advantages that VARCHAR2 has over CHAR in Oracle).
I don't know if that would be a problem in your case taking into account the interaction with PeopleSoft but it might be worth giving it a try.
Interesting because my columns are defined as VARCHAR2 in Oracle.
A viable workaround for me right now is to define the columns as NULL. My main concern with with several Peoplesoft panels that would be used to update the tables and if the columns were defined to allow NULLS then how would PS react with it. However, this does not appear to be a problem with the PS panels as they display empty cells.
Your explanation on the conversion to nulls makes complete sense to me given the trials that I have performed. Thanks for the info! I definitely think this is more of an issue with Oracle.
Depending on future requirements, I may revisit this but I find it interesting that I cannot add a space to the Oracle columns.
I needed a clarification on this error.I am getting the same error.as mentioned by you.where did you include the ELSE IF clause.
|Powered by Social Strata|