Declare @Size Int
Select @Size = Character_Maximum_Length
From Information_Schema.Columns
Where Table_Name = 'YourTableName'
And Column_Name = 'YourColumnName'
If @Size >= Len(@YourString)
Begin
Select 'String is ok'
End
Else
Begin
Select 'String is too long'
End