CAST( CASE WHEN ISNUMERIC(Ref_Column) = 1 THEN Ref_Column ELSE 0 END as INT)
Conversion failed when converting the varchar value '£123.45 ' to data type int.
declare @value varchar(100) = '$125' select case when isnumeric(@value) = 1 then cast(cast(@value as money) as int) else 0 end
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)