====== pears.NetValidateEmailAddress ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Original SQL =====
COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetValidateEmailAddress" IS
'create FUNCTION pears."NetValidateEmailAddress"
(in @email varchar(200) )
returns long varchar
begin
declare RV long varchar;
set RV = if isnull((select 1 where @email REGEXP ''^[a-zA-Z0-9.!#$%&''''*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?)*\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?)*$'' ),0) = 1
then ''''
else ''Invalid e-mail Address''
end if;
return(RV)
end'