I have been trying to achieve this in SQL (Oracle 11g) for a while but could not find a proper way to do it.
My table names has the following rows:
names
You may use some temp table containing list of numbers 1 to N, where N is the highest number in your table names. Let call it num(o int) Then the query will be
num(o int)
SELECT * FROM names, num WHERE num.o <= names.repeat