I have an SQL table which has nullable numerical fields (and none of the fields have default values) , and I want to use a Named Query to update it. Basically a simple:
UPDATE TableName
SET
FieldName1 = :FieldValue1,
FieldName2 = :FieldValue1,
FieldName2 = :FieldValue1
WHERE keyField=:KeyVal
When testing the query from the Name Query testing panel I only filled out the parameters for the KeyVal and one of the numerical value fields. But when I browsed the table directly from the DB I saw that all the numerical fields for which I did not explicitly supply a value had a value of zero.
How do I fill out parameters in a Named Query test so that null (or python None) values get correctly propagated to the DB table as nulls?
Or is this just a side effect of the testing panel?
And if I call the query with a dictionary like { ‘FieldValue1’ : None, ‘FieldValue1’ : None } etc, will that propagate the null values?