Hi,
I am using the below function to validate the email address
ALTER FUNCTION [dbo].[udf_ValidateEmail] (@email varChar(255))
RETURNS bit
AS
begin
return
(
select
Case
When @Email is null then 0 --NULL Email is invalid
When charindex(' ', @email) <> 0 or --Check for invalid character
charindex('/', @email) <> 0 or --Check for invalid character
charindex(':', @email) <> 0 or --Check for invalid character
charindex(';', @email) <> 0 then 0 --Check for invalid character
When len(@Email)-1 <= charindex('.', @Email) then 0--check for '%._' at end of string
When @Email like '%@%@%'or
@Email Not Like '%@%.%' then 0--Check for duplicate @ or invalid format
Else 1
END
)
end
but it is not validating whether i have .com/.org/.net/.co.uk/.co.in/.in
which means it should have to check i must have domain name after dot(.)
please help me on validating the email address