How to convert data type from varchar to number in SQL Server?
In Sql Server 2012 and up: each of these will return null when the conversion fails instead of an error.


try_convert(datatype,val)
try_cast(val as datatype)
try_parse(val as datatype [using culture])


So if you want to change the way a view is returning the value you would use something like:

alter view dbo.myView as 
  select
    ....
    , store_nbr = try_cast(dbo.customer.store_nbr as int)
    ....