Home Forums SQLServerCentral.com Anything that is NOT about SQL! The fun factor: Magical numbers and other peculiarities RE: The fun factor: Magical numbers and other peculiarities
mickyT
SSChampion
Points: 10360
More actions
June 15, 2014 at 1:28 pm
#1721808
To stick with a theme 🙂
DECLARE @Team1 VARCHAR(10) = 'Italy'
DECLARE @Team2 VARCHAR(10) = 'England'
SELECT @Team1 + ': ' + CAST(LEN(@Team1) % 3 AS VARCHAR(2)),
@Team2 + ': ' + CAST(LEN(@Team2) % 3 AS VARCHAR(2))