|
Posted by Tony Rogerson on 11/13/06 17:44
Hi Jamie,
Its all about complexity, its doable in T-SQL but its very long winded and
hard to understand/maintain - compared to the regurlar expressions
available.
You need to consider a) valid characters, b) all the dots are in place, c)
there is an @ in the right place, thats the easy stuff, but then there are
domains/sub-domains to consider which means you need to start thinking
recursively....
--
Tony Rogerson
SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson - technical commentary from a SQL
Server Consultant
http://sqlserverfaq.com - free video tutorials
"onedaywhen" <jamiecollins@xsmail.com> wrote in message
news:1163423991.244200.11710@b28g2000cwb.googlegroups.com...
>
> On Nov 12, 8:48 am, "Tony Rogerson" <tonyroger...@sqlserverfaq.com>
> wrote:
>> Are you going to finally admit you are wrong and that the only reasonable
>> way to validate an email address in a CHECK CONSTRAINT is CLR?
>
> Tony,
> Please clarify which aspects of an email address you consider cannot be
> validated via TSQL.
>
> I know the things that can be validated using basic pattern matching
> (number of characters, exactly one 'commercial at', at least one period
> following the 'commercial app', etc) so what do you have in mind that
> can only be done via CLR? I assume we can agree that verification (e.g.
> can I send mail to this email address) is out of scope.
>
> TIA,
> Jamie.
>
> --
>
Navigation:
[Reply to this message]
|