Hello, Suppose I have a table called Tickets and fields are:
ticketNumber, integer
name, Text
And I want a form where the user enters 3 things:
1. a start number
2. an end number
3. a name
And when he pressed "OK", it should perform an INSERT INTO statement where it generates 1 record for each number in the range between [start] and [end] with the given name.
So for example if the user enters 4, 6, "John", then it should append the following 3 records:
4, John
5, John
6, John
How can I achieve this effect with a clean solution? I've heard about the technique called "auxiliary number table" and combining it with a certain select statement, one can get the desired effect. But the number field can get quite large, so I was wondering if there is another solution that perhaps uses loops of some kind. It's too bad the SQL editor doesn't allow WHILE.