USE MasterCompanyDB
GO

/*SCRIPT DESCRIPTION
Ticket No        : WT-88
Created Date   : 22-March-16  
Created By      :<<vijayendra@harbinger.com>>
*/   
Go
IF NOT EXISTS(SELECT IsLastName FROM PasswordCredentials WHERE 
	IsLastName=1 and LastNameCount=1 and 					
	IsFirstName=1 and  FirstNameCount=2 and  					
	IsSocialSecurityNo=1 and SocialSecurityNoCount=3 and 					
	IsDateOfBirth=1 and DateOfBirthCount=2	
	and IsEmpID=1 and EmpIDCount = 2 and MinCharacters = 10)
BEGIN
	Update PasswordCredentials SET IsLetterMust = 1, IsDigitMust = 1, IsSpCharMust = 1, IsUpperCharMust = 1, IsLowerCharMust = 1,  MinCharacters = 10							
							
	Update	PasswordCredentials 		
	SET		IsLastName=1, LastNameCount=1, 	
			IsFirstName=1,  FirstNameCount=2,  	
			IsSocialSecurityNo=1, SocialSecurityNoCount=3, 	
			IsDateOfBirth=1, DateOfBirthCount=2,	
			IsEmpID=1, EmpIDCount = 2	
END

GO