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.