Check Constraint : col1 Null if col2 Not Null
RomainH
Posts: 1 New member
Hi everyone,
I can't found how I can do this,
It seems to me, a python script can not do that because it can not return a null value...
Is there a workaround or something that makes it possible?
Thanks
Tagged:
Answers
You can return DBNull like this to return NULL
But I couldn't get a check for a row value of NULL to work. I tried
But couldn't get it to work.
If I did
Then it would correctly place null or the number 4
But that required me to know the value of col2 to check against.
So I'm not sure what might work here, perhaps you have solved that part of it and just returning DBNull will get you there, if so please let us know!
Kind regards,
Alex
Have you visited our Help Center?
Hello, I am struggeling with the same issue. Are there any updates on "how to check another column value for null within a python script"?
EDIT: Finally found out myself. We need to use Found it by accident. Where is a documentation for that?