Forum Discussion
How to Create Random, Unique, Alphanumeric Data in a Field
- Anonymous9 years ago
HI SharonHMA,
You can try to use below formula to create guid column, the max count of characters combo is 308,915,776 (26^6).
GUID = UPPER(UNICHAR(RANDBETWEEN(97,122)))&UNICHAR(RANDBETWEEN(97,122))&UNICHAR(RANDBETWEEN(97,122))&UNICHAR(RANDBETWEEN(97,122))&UNICHAR(RANDBETWEEN(97,122))&UNICHAR(RANDBETWEEN(97,122))
Regards,
Xiaoxin Sheng
HI SharonHMA,
You can try to use below formula to create guid column, the max count of characters combo is 308,915,776 (26^6).
GUID = UPPER(UNICHAR(RANDBETWEEN(97,122)))&UNICHAR(RANDBETWEEN(97,122))&UNICHAR(RANDBETWEEN(97,122))&UNICHAR(RANDBETWEEN(97,122))&UNICHAR(RANDBETWEEN(97,122))&UNICHAR(RANDBETWEEN(97,122))
Regards,
Xiaoxin Sheng
The big amount of possible values just makes duplicate values extremly unlikely. But it does not really guarantee unique values by design, right? Any idea how to accomplish that?
- Anonymous8 years agoNot applicable
Hi Sokon,
Maybe you can try to enter to query editor and use Text.NewGuid function to create unique guid.
Regards,
Xiaoxin Sheng
- Sokon8 years agoAdvocate V
jthomson: Thanks for the idea! Using that approach I'd lose the random aspect, because knowing the rule, we could restore the original data, right?
Anonymous: Thanks for the hint, too! I didn't know about that function. Yes, with that i should be able to create a list of distinct values i want to anonymize and attach a guid to them. Then I could use the result as a mapping table possible that can be used to replace the original values. I'll give it a try!
Thanks for your help!