Email Validation Help



Programming Help Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Email Validation Help Expand / Collapse
Author
Message
Posted 8/28/2008 8:03:03 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/28/2008 9:56:22 AM
Posts: 1, Visits: 3
Writing an email validation code using select, where, or and like statements.  Something like this:

select emailaddress from contact where ((emailaddress = ''

-This looks for entries where email was left blank

I am having trouble making the code to make sure "_" does no appear after "@".  If anyone can help me out, thanks.

Post #1925
Posted 8/29/2008 7:15:28 AM
Admin

AdminAdminAdminAdminAdminAdminAdminAdmin

Group: Administrators
Last Login: 12/18/2008 2:13:35 PM
Posts: 42, Visits: 47
Hopefully this will help you out a little.  This indicates if there is any '_' after the @.

WHERE ((SELECT CHARINDEX('@', emailaddress) +1 ) > (SELECT CHARINDEX('_', emailaddress, (SELECT CHARINDEX('@', emailaddress)))))

Post #1927
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: ProgrammingHelp, Viral Unity, Matt.Hill, DaveL, Alex.D

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 8:16pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.019. 14 queries. Compression Disabled.