Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
I have a name field and I want i to keep the same number of chacters but replace everything with '*' except for the first character.
e.g.
Name = 'Smith' - Encrypted Name = 'S***'
Name = 'Johnson' - Encrypted name = J******
Is there any script that will do this?
Thanks
Phil
 Gysbert_Wassena
		
			Gysbert_WassenaLeft(Name,1) & repeat('*', len(Name)-1) as Name
 Gysbert_Wassena
		
			Gysbert_WassenaLeft(Name,1) & repeat('*', len(Name)-1) as Name
 
					
				
		
Perfect.
Thanks
Phil
 
					
				
		
As a further q is there any way I can put the last character on there aswell
E.g. J*****n
 
					
				
		
modify Gysbert's expression to do it:
Left(Name,1) & repeat('*', len(Name)-2) & right(Name,1) as Name
 
					
				
		
It's better define a maximum size: (in this case 60)
Left(Name,1) & repeat('*', 58) & right(Name,1) as Name
