TSQL WHILE logic and build a random integer

Useful for populating random numbers or inserting a number of new rows.