AnsweredAssumed Answered

Is there a way to prevent duplicate data when using RANDDIGITS(MINLEN, MAXLEN)

Question asked by ThanNguyen82306198 on Oct 5, 2016
Latest reply on Oct 13, 2016 by ThanNguyen82306198

Hello,

 

I would like to create synthetic SSN using the RANDDIGITS(MINLEN, MAXLEN) function.  If I have table repeat count, will this function prevent duplicate SSNs from being generated?  My guess is no, this function will not prevent duplicate SSNs from being generated since they are random digits.  This is one example of the function I am using:  @randdigits(3,3)@@randdigits(2,2)@0000 resulting in something like '612040000'.  Is there a better way of generating synthetic SSN if I also need the table repeat count to be larger than 100?

 

Thank you. 

Outcomes