• There is a terminolgy issue here. The numbers in this sequence are not actually random as we could predict the next number in the sequence by looking at the previous values, the accuracy of this prediction would get better as we went along.

    For example, if there were 9 numbers in the range and we specified that they would not repeat then we might get a sequence

    3,2,5,4,7,8,1,6

    The next number would have to be 9 as it's the only number left in the sequence.

    I'm not sure if what you described would clasifiy as pseudo random but I know that the Linear Feedback Shift Register technique definately is.

    However, with regards to generating test data both these techniques are great and it's a well written article so many thanks.

    Other functions to play with with regards to generating test data are the HashBytes function and CHECKSUM function which both have the useful property of being able to take a string and generate a unique value from it.

    So for example Checksum('John Doe') would always return the same value.

    See also:

    http://msdn.microsoft.com/en-us/library/aa175776(SQL.80).aspx