I have a tricky problem that I am trying to work around. I have a database that needs to create a datafile in a specific format. The keys are in a staggered array, and I need the query to generate the data with the gaps filled in, a simplified example follows:
ID DATA
500 12
501 20
502 100
505...