Search
 
SCRIPT & CODE EXAMPLE
 

SQL

t-sql email validation

IF (
     CHARINDEX(' ',LTRIM(RTRIM(@email_address))) = 0 
AND  LEFT(LTRIM(@email_address),1) <> '@' 
AND  RIGHT(RTRIM(@email_address),1) <> '.' 
AND  CHARINDEX('.',@email_address ,CHARINDEX('@',@email_address)) - CHARINDEX('@',@email_address ) > 1 
AND  LEN(LTRIM(RTRIM(@email_address ))) - LEN(REPLACE(LTRIM(RTRIM(@email_address)),'@','')) = 1 
AND  CHARINDEX('.',REVERSE(LTRIM(RTRIM(@email_address)))) >= 3 
AND  (CHARINDEX('.@',@email_address ) = 0 AND CHARINDEX('..',@email_address ) = 0)
)
   print 'valid email address'
ELSE
   print 'not valid'
Comment

PREVIOUS NEXT
Code Example
Sql :: suse start MySQL 
Sql :: min:sec datediff mssql 
Sql :: c# execute transact sql 
Sql :: To Create directory 
Sql :: for each row trigger postgresql 
Sql :: firebird where 
Sql :: ring rollback updates to the database using the odbc_rollback() 
Sql :: SQL Equal to Operator (=) 
Sql :: utiliser 3 jointures mysql 
Sql :: copy table from postgresql to mysql 
Sql :: mysql service not starting 
Sql :: how to fetch unique records from two tables 
Sql :: create sql server database 
Sql :: sql start with vowels 
Sql :: sql include rows with 0 values 
Sql :: SQL Multiple Parameterized Procedures 
Sql :: Enable outgoing remote MySQL access 
Sql :: save_details_inrichting 
Sql :: create table using the clause with as 
Sql :: plsql check for string in numeric 
Sql :: android sqlite query con join 
Sql :: mysql count with two joins 
Sql :: sintax checker sql 
Sql :: import sql inside hide sql 
Sql :: update values in select statement sql 
Sql :: postgres insert knex 
Sql :: primary key in sql 
Sql :: SQL LIKE With Wildcards 
Sql :: sql select statement 
Sql :: How to do IF NOT EXISTS in SQLite 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =