Thank this author by sharing:
By William Talada,
When converting varchar data to bigint datatype, you can use IsNumeric() builtin function but it returns true even if a number string contains strange characters. It also does not do range checking. Just run the included script to create the IsBigInt() function in your database. If it returns true, you can be sure the string will cast to bigint.
As a member of SQLServerCentral, you get free access to loads of fresh content: thousands
of articles and SQL scripts, a library of free eBooks, a weekly database news roundup,
a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals
that makes it such a success.