Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how to validate email in stored procedure?

Author  Topic 

samsun125
Yak Posting Veteran

63 Posts

Posted - 2008-11-06 : 09:30:28
Hi Friends,

i have one query , in my stored procedure i am retrieving emailid,if it sent means i am giving true message from the sp

DECLARE @result xml
SET @result ='<Flags><Flag Result="1"></Flag></Flags>'
SELECT @result


that email is not in correct format means i want to display falg as false from sp

how to this.

Thanks & Regards
RamaDevi

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-11-06 : 09:33:32
http://vyaskn.tripod.com/handling_email_addresses_in_sql_server.htm

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-06 : 09:34:34
[code]CREATE PROCEDURE ValidateEmail
@EmailID varchar(20),
@Valid bit OUTPUT
AS
--validation code

IF <check email in correct format>
SET @Valid=1
ELSE
@Valid=0
GO[/code]
[code]DECLARE @Ret bit
EXEC ValidateEmail emailidval,@ret OUT

SELECT @Ret[/code]
Go to Top of Page
   

- Advertisement -