Super User
Super User
Posts: 9,286
Registered: ‎07-11-2015


[ Edited ]

OK, I had some idea that I could make this cool but ended up just going brute force with it. If you are ever in need of a quick and dirty way to "anonymize" data for presentations, etc. but still maintain uniqueness, this will do it.



Column = 
VAR __value = [PCB_Employee_Name_STR]
VAR __a = SUBSTITUTE(__value,"a",UNICODE("a"))
VAR __b = SUBSTITUTE(__a,"b",UNICODE("b"))
VAR __c = SUBSTITUTE(__b,"c",UNICODE("c"))
VAR __d = SUBSTITUTE(__c,"d",UNICODE("d"))
VAR __e = SUBSTITUTE(__d,"e",UNICODE("e"))
VAR __f = SUBSTITUTE(__e,"f",UNICODE("f"))
VAR __g = SUBSTITUTE(__f,"g",UNICODE("g"))
VAR __h = SUBSTITUTE(__g,"h",UNICODE("h"))
VAR __i = SUBSTITUTE(__h,"i",UNICODE("e"))
VAR __j = SUBSTITUTE(__i,"j",UNICODE("j"))
VAR __k = SUBSTITUTE(__j,"k",UNICODE("k"))
VAR __l = SUBSTITUTE(__k,"l",UNICODE("l"))
VAR __m = SUBSTITUTE(__l,"m",UNICODE("m"))
VAR __n = SUBSTITUTE(__m,"n",UNICODE("n"))
VAR __o = SUBSTITUTE(__n,"o",UNICODE("o"))
VAR __p = SUBSTITUTE(__o,"p",UNICODE("p"))
VAR __q = SUBSTITUTE(__p,"q",UNICODE("q"))
VAR __r = SUBSTITUTE(__q,"r",UNICODE("r"))
VAR __s = SUBSTITUTE(__r,"s",UNICODE("s"))
VAR __t = SUBSTITUTE(__s,"t",UNICODE("t"))
VAR __u = SUBSTITUTE(__t,"u",UNICODE("u"))
VAR __v = SUBSTITUTE(__u,"v",UNICODE("v"))
VAR __w = SUBSTITUTE(__v,"w",UNICODE("w"))
VAR __x = SUBSTITUTE(__w,"x",UNICODE("x"))
VAR __y = SUBSTITUTE(__x,"y",UNICODE("y"))
VAR __z = SUBSTITUTE(__y,"z",UNICODE("z"))
VAR __b1 = SUBSTITUTE(__a1,"B",UNICODE("B"))
VAR __c1 = SUBSTITUTE(__b1,"C",UNICODE("C"))
VAR __d1 = SUBSTITUTE(__c1,"D",UNICODE("D"))
VAR __e1 = SUBSTITUTE(__d1,"E",UNICODE("E"))
VAR __f1 = SUBSTITUTE(__e1,"F",UNICODE("F"))
VAR __g1 = SUBSTITUTE(__f1,"G",UNICODE("G"))
VAR __h1 = SUBSTITUTE(__g1,"H",UNICODE("H"))
VAR __i1 = SUBSTITUTE(__h1,"I",UNICODE("I"))
VAR __j1 = SUBSTITUTE(__i1,"J",UNICODE("J"))
VAR __k1 = SUBSTITUTE(__j1,"K",UNICODE("K"))
VAR __l1 = SUBSTITUTE(__k1,"L",UNICODE("L"))
VAR __m1 = SUBSTITUTE(__l1,"M",UNICODE("M"))
VAR __n1 = SUBSTITUTE(__m1,"N",UNICODE("N"))
VAR __o1 = SUBSTITUTE(__n1,"O",UNICODE("O"))
VAR __p1 = SUBSTITUTE(__o1,"P",UNICODE("P"))
VAR __q1 = SUBSTITUTE(__p1,"Q",UNICODE("Q"))
VAR __r1 = SUBSTITUTE(__q1,"R",UNICODE("R"))
VAR __s1 = SUBSTITUTE(__r1,"S",UNICODE("S"))
VAR __t1 = SUBSTITUTE(__s1,"T",UNICODE("T"))
VAR __u1 = SUBSTITUTE(__t1,"U",UNICODE("U"))
VAR __v1 = SUBSTITUTE(__u1,"V",UNICODE("V"))
VAR __w1 = SUBSTITUTE(__v1,"W",UNICODE("W"))
VAR __x1 = SUBSTITUTE(__w1,"X",UNICODE("X"))
VAR __y1 = SUBSTITUTE(__x1,"Y",UNICODE("Y"))
VAR __z1 = SUBSTITUTE(__y1,"Z",UNICODE("Z"))


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!