Any loop structure, as insignificant as it may seem, always takes a toll on the way your application or script performs.The following two scalar-valued functions are only compatible with SQL Server 2005 and above, and make use of the constant values associated to certain SQL Server bit options stored in the master.dbo.spt_values table to validate whether a character is a number or an alpha.