Mega Code Archive

 
Categories / MSSQL Tutorial / System Settings
 

Connection-level exception

6>  CREATE PROCEDURE ConversionException 7> AS 8> BEGIN 9>     SELECT CONVERT(INT, 'abc') 10> END 11> GO 1> 2> 3> EXEC ConversionException 4> PRINT 'This will NOT print!' 5> GO Msg 245, Level 16, State 1, Server J\SQLEXPRESS, Procedure ConversionException, Line 9 Conversion failed when converting the varchar value 'abc' to data type int. 1> 2> drop PROCEDURE ConversionException; 3> GO