|
|
|
Forum 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.
|
|
|
|
|
Admin
      
Group: Administrators
Last Login: 4/27/2009 7:34:30 AM
Posts: 46,
Visits: 52
|
|
| 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)))))
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 4/2/2009 5:42:10 PM
Posts: 10,
Visits: 2
|
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 4/3/2009 2:51:19 PM
Posts: 9,
Visits: 2
|
|
| Look for email validation REGEXes - they're far more accurate than just checking for an @ sign and a . after it.
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 4/13/2009 7:35:58 PM
Posts: 14,
Visits: 3
|
|
| Validate all input with regular expressions before writing the data to tables.
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 4/16/2009 2:08:02 PM
Posts: 11,
Visits: 133
|
|
i learned how to do a few things
carman most
|
|
|
|