1. We have moved to a new forum! There may be a few things not working properly so please let us know if you find a bug. Remember to use the bbCode [ sql ] tag for SQL statements.

How to query for valid email address with _@_._ format?

Discussion in 'SQL - Questions and Answers' started by King, Dec 5, 2006.

  1. King Guest

    Dialect: MS SQL
    How do I query for emails from a table with right format of _@_._ e.g Example@Test.com
  2. Dave Guest

    Dialect: MS SQL
    this may get you part of the way there....

    this SQL will display name and email addresse missing an @ sign or a period.

    SELECT last_name, first_name, email
    FROM [your table]
    WHERE (LEN(email) > 0) AND ((CHARINDEX('.', email) = 0) or
    (CHARINDEX('.', email) = 0))

Share This Page