Subject Re: [firebird-support] Prime numbers
Author Leonardo Carneiro
Do you need to calculate this on the database? Can you not populate a table
with the numbers found on the internet? =)

Best Regards


On Tue, Jan 15, 2013 at 4:16 PM, Roberto Carlos <rc.1990@...> wrote:

> The example below is from PostgreSQL. Is there an easy way to do it in
> Firebird 2.5 or 3.0?
>
> I need prime numbers to analyse bio data:
>
> with primes (num) as (
> select generate_series(2,10000)
> )
> SELECT num
> FROM primes p1
> WHERE num not in (
> SELECT p1.num
> FROM primes p2
> WHERE p2.num < p1.num
> AND MOD(p1.num, p2.num) = 0
> );
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>
>


[Non-text portions of this message have been removed]