I'm posting a function I wrote a year ago which validates an email string syntax.If anyone wants to try their hand at a slicker solution, I'd like to see how it could be improved.SamCREATE FUNCTION dbo.EmailIsValid (@Email varchar (100))RETURNS BITASBEGINDECLARE @atpos int, @dotpos intSET @Email = LTRIM(RTRIM(@Email)) -- remove leading and trailing blanksIF LEN(@Email) = 0 RETURN(0) -- nothing to validateSET @atpos = charindex('@',@Email) -- position of first (hopefully only) @IF @atpos <= 1 OR @atpos = LEN(@Email) RETURN(0) -- @ is neither 1st or last or missingIF CHARINDEX('@', @email, @atpos+1) > 0 RETURN(0) -- Two @s are illegalIF CHARINDEX(' ',@Email) > 0 RETURN(0) -- Embedded blanks are illegalSET @dotpos = CHARINDEX('.',REVERSE(@Email)) -- location (from rear) of last dotIF (@dotpos < 3) or (@dotpos > 4) or (LEN(@Email) - @dotpos) < @atpos RETURN (0) -- dot / 2 or 3 char, after @RETURN(1) -- Whew !!ENDGo