stored procedure to insert emails while varifing it

bởi agupt
stored procedure to insert emails while varifing it

create procedure sp_Valid_Emails --@Lname varchar(25), --@Fname varchar(25), --@Mname varchar(20), --@Email varchar(50) as begin if exists(Select * From dbo.tbl_Daily_Emails) Insert into dbo.tbl_Valid_Emails Select Lname, Fname, Mname, Email From tbl_Daily_Emails Where CHARINDEX(&#039;.&#039;,REVERSE(LTRIM(RTRIM(Email)))) IN (3, 4) AND CHARINDEX(&#039;@&#039;,(LTRIM(RTRIM(Email)))) <> 0 AND LEN(LTRIM(RTRIM(Email))) - LEN(REPLACE(LTRIM(RTRIM(Email)),&#039;@&#039;,&#039;&#039;)) = 1 AND CHARINDEX(&#039; &#039;,(LTRIM(RTRIM(Email)))) = 0 AND CHARINDEX(&#039;/&#039;,(LTRIM(RTRIM(Email)))) = 0 AND CHARINDEX(&#039;.&#039;,(LTRIM(RTRIM(Email)))) - CHARINDEX(&#039;@&#039;, (LTRIM(RTRIM(Email)))) > 1 Else Insert into dbo.tbl_NotValid_Emails select Lname, Fname, Mname, Email From tbl_Daily_Emails

image of username agupt Flag of United States Portage, United States

Giới thiệu

<span> I have worked as Database designer and Database reporting person for 2 of the most prestigious company in West Michigan 6 years ago. I took off from work in 2005 to take care of family and kids. Now, I am trying to come back and looking for some projects to start with. I carry a decent understanding of relational Databases, its definition and manipulation languages, normalization, complex joins, stored procedures, User defined function, SSRS and Crystal reports. I recently completed a training as a SQL Server Developer, also completed a SQL Developer's Video course (500+ video) fr</span><span exttxt="om Learnitfirst and continue to work on it. I have also taken few and java programming classes. I have 5 years of experience developing reports using Crystal Reports against a SQL Server Database. I have designed several hundreds of reports ranging from simple to complex acknowledgements. " class="profile_ext">... </span><a class="profileToggle" href="javascript:void(0)">Read more</a>

$10 USD/Giờ