G
Guest
I have a table with two columns, one with a characteristic and the other with
a count. I want to create a new table with just one column: a list of the
characteristic repeated for as many times as the count value.
For example, go from this:
BLUE 3
RED 1
GREEN 2
To this:
BLUE
BLUE
BLUE
RED
GREEN
GREEN
I need to this so I can easily randomly select some rows from this list
instead of creating weighting factors based on the original counts.
I am NOT familiar with SQL. I was hoping I could just do this with a query.
Any help is much appreciated!
a count. I want to create a new table with just one column: a list of the
characteristic repeated for as many times as the count value.
For example, go from this:
BLUE 3
RED 1
GREEN 2
To this:
BLUE
BLUE
BLUE
RED
GREEN
GREEN
I need to this so I can easily randomly select some rows from this list
instead of creating weighting factors based on the original counts.
I am NOT familiar with SQL. I was hoping I could just do this with a query.
Any help is much appreciated!