We have a functionality where we need to create a sequence from 0 with increment of 1 and going up to a maximum value (count of a table).
We are using a dynamic variable 'maxi' that take the max count of a table and stores this max value.
Next we are creating a SEQUENCE between 0 and maximum value that we obtained in the previous step.
Query we are using is - CREATE SEQUENCE SERIES increment by 1 minvalue 0 maxvalue <%=maxi%> start with 0
The problem is: We need to store this sequence in a table and then use that table to do a CROSS JOIN with another query. We are not able to develop a correct syntax to store this sequence in a table.
We would need your help in developing the correct queries to:
- Create a table that stores a sequence from 0 to a max value (say 100), and
- Create a correct CROSS JOIN reference with another query