On 8/30/02, Jim Gurfein penned:
>Hi List,
>
>All you gurus out there... I'm trying to find a way to select every nth
>record from a database that has 200,000 records. How would I go about
>setting up the SQL to select every 15th record ?
>
>Any and all help would be appreciated!

Not sure how or if you can do it at the SQL level. But on the output 
it would be easy.

<cfset nth = 15>

<cfoutput query="myquery">
<cfif currentrow MOD nth EQ 0>#data#</cfif>
</cfoutput>

Of course, it would certainly help the performance if you could do it 
at the SQL level and I'm curious as to if you can. Anyone? :)
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to