Page 1 of 1

Assignment of a NULL value to a NOT NULL column

Posted: Mon Jun 07, 2010 12:06 pm
by sreddy
Hi

I am getting this warning.

Assignment of a NULL value to a NOT NULL column "TBSPACEID=3, TABLEID=9, COLNO=94" is not allowed. SQLSTATE=23502

Please respond with useful information.

Thanks
SReddy

Posted: Mon Jun 07, 2010 12:17 pm
by Sreedhar
The error message says

"Assignment of a NULL value to a NOT NULL column "

So that is your clue...

Posted: Mon Jun 07, 2010 12:30 pm
by sreddy
In my job some of the source columns ( NULL) are mapped with Not Null columns in the target , while inserting the data. I am getting the warnings.


how can i avoid these warnings.

Posted: Mon Jun 07, 2010 12:33 pm
by Sreedhar
Populate Default values (Ask your Business) like Spaces or Default Dates. Which ever are applicable?

Posted: Mon Jun 07, 2010 4:19 pm
by vmcburney
If you use a Transformer to map a NULLABLE column to a NOT NULL column and then use the NULLTOVALUE function to choose a default value when a null value is found it should remove the warning messages.

It you are completely sure your NULLABLE fields hold no NULL values and never will hold a NULL value you can demote the warning message to an information message by using a message handler that runs the demotion for just those jobs that are identified as being safe. This can be risky because unhandled NULLs can result in the entire row being dropped or a job abort.

Posted: Thu Jun 10, 2010 9:40 am
by sreddy
Thank you for All

I fixed this issue.

Posted: Thu Jun 10, 2010 10:19 am
by agpt
sreddy wrote:Thank you for All

I fixed this issue.
Please specify the approach which you used exactly and mark the topic as resolved. :)

Posted: Thu Jun 10, 2010 4:27 pm
by ray.wurlod
Probably stopped mapping nullable columns to non-nullable targets.