Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

Convert Zero-Length String to NULL during INSERT

$
0
0

Hi,

I have an app that is not using Stored Procedures (it is using Hibernate) to insert records into tables.

It can save <null> into nullable-number fields just fine, but is always inserting a zero-length string in a nullable-varchar field.  The app developer is having a hard time figuring out how to get it to save a proper null.

Is there anything I can do on the DB side to convert the zero-length string to a null short of using an INSTEAD OF trigger?  Stored procs are not currently an option.


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>