SQL Server insert with XML parameter - empty string not converting to null for numeric
- by Mayo
I have a stored procedure that takes an XML parameter and inserts the "Entity" nodes as records into a table. This works fine unless one of the numeric fields has a value of empty string in the XML. Then it throws an "error converting data type nvarchar to numeric" error.
Is there a way for me to tell SQL to convert empty string to null for…