• The code on the thread below uses the Sieve of Eratosthenes and Sieve of Aitken to find prime numbers.

    Tests for the Sieve of Aitken returned all primes below 100,000 in 0.6 seconds and all primes below 5,000,000 in 55 seconds. I believe this was on an old desktop computer. The Sieve of Eratosthenes took over twice as long.

    Prime Number Table Function

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=69646