1
Vote

<Null> values converted to zero

description

I have an interesting discovery, when publishing to Azure I find that on some fields that are involved in calculated columns, if the existing value is <null> it is transposed to a zero after publishing up to the cloud.

For example

[field1] <-Nullable decimal
[field2] <-Nullable decimal
[calcField] <- {[field1]+[field2])

If field1 has a value and field2 is <Null>, field2 is being transposed to a zero value.

This is causing grief as some queries are using WHERE IS [NOT] NULL for logic.

comments

javamarket wrote Dec 22, 2013 at 12:10 AM

Looks like a similar post has identified this and it is a function of bcp.exe

http://technet.microsoft.com/en-us/library/ms187887.aspx

I would love an option to set this bcp optional parameter (-k) within the utility.

ghuey wrote Dec 22, 2013 at 4:25 AM

http://sqlazuremw.codeplex.com/workitem/7630

Check out the above link. Basically, you can play with the BCP parameters in SQLAzureMW.exe.config file. Look for <add key="BCPArgsOut" value=""{0}" out {1} -E -n -C RAW"/>

Let me know if you have any questions.

Regards,
George