John Mitchell-245523 (7/25/2013)
This indeed returns 0:
SELECT CAST('' AS int)
It's just the way it works. I suppose when the DBMS or the standards were being written, somebody decided that '' would convert to 0 rather than throwing an error.
John
Yeah, empty string, when converted to any T-SQL numeric datatypes except DECIMAL and NUMERIC will end up as 0 (zero).