When Target column does not allow Null Value

Good morning,  I am trying to run Table to Table rule... 
Since target column does not allow Null value, the substitution rule was ran to the Target column first.  Then, I tried to run Table to Table rule but I receive an error "Cannot insert the value Null into Column to target table. Update fails"   I added Apply to Source Table Where 'columnsvvaluevname' is not NULL  in Where Clause.   However, I still received a same error message.   How can I run Table to Table while skipping the Source NULL column value?   
Tagged:

Best Answer

  • PlantBasedSQLPlantBasedSQL Posts: 187 Gold 4
    Hi @bcnk thank you for your post.
    I have checked and been able to reproduce this error, however this is a bug I believe which I will raise with the development team.
    In the meantime the workaround you can use is to append the source table column (in the WHERE clause) with DMSRC like so:



    and this will override the default behavior to check the source column. If you want to filter on target column then you will need to use DMTGT instead and choose "Apply to target table".

    Let me know if this fixes your issue! Thank you very much.
    Kindest.

Answers

Sign In or Register to comment.