| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: SQL Range of numbers in steps
Larry D wrote:
> I need to run a report on numbers in a range of numbers.
> Each one increments 8 from the last.
>
> For example:
>
> 10000
> 10008
> 10016
> etc.
>
> There are thousands of these numbers and it would not
> be worth my time to enter each of these individually.
>
> How do I do a search in SQL with this?
>
> I have programmed with other computer languages, so
> I know about for, next, step. . .
>
> I am using Viewpoint SQL and Microsoft Windows 2000.
>
> Thank you in advance for your help.
If the numbers already exist in a table, one can simply query them. If they do not already exist in a table, some dialects of SQL will let you express a query to generate them using what's called a transitive closure, but many dialects do not have a transitive closure.
A quick browse of the Logotron website suggests you should look to the Viewpoint scripting language instead of SQL: http://www.logotron.co.uk/viewpoint/faq.html#reno
It has 'While' loops for sure, but I did not find any comprehensive description of the scripting language. It might have some sort of 'For' syntax as well. Received on Sat Mar 31 2007 - 09:59:36 CDT
![]() |
![]() |