Generating Random Number List
Posted on 2013-11-07
I have a one time programing request that I think could be solved with some SQL (also coding in ColdFusion)
Problem: I need to generate in a random sequence a list if all possible 4 digit numbers only using the set of digits (1,2,3,4,5)
ex: 1234, 4455, 5555, 1111.
I'm not sure how to do this best. I could
- Sequentially insert rows with all numbers from 1111 - 5555 (within the set of digits)
- Assign with it a random number (or use SQL to generate that).
- Select all rows ordered by random number?
What do you think?
Thanks in advance