Here's the solution I use under SQL 2000... change the 10 to any incremental
value you wish to do the math against (i.e.. 10 is the mod - division
factor)
<cfquery name="test" datasource="#DSOURCE#">
select
*
from
BREWERS
where
brewerid % 10=0
</cfquery>
<cfloop query="test">
<cfoutput>#brewerid#<br></cfoutput>
</cfloop>
Paris Lundis
Founder
Areaindex, L.L.C.
http://www.areaindex.com
http://www.pubcrawler.com
(p) 1-212-655-4477
[finding the future in the past, passing the future in the present]
[connecting people, places and things]
-----Original Message-----
From: Jim Gurfein [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 01, 2002 8:45 PM
To: CF-Talk
Subject: Re: Nth Record Selection Set
These functions don't appear in MSSQL7.0... the mod function is represented
by '%' in the select as a function... so far, I'm not a real lot closer to
answer this problem. Anyone know of a way to create some sort of on the fly
Identity number (rowcount in cf) that would all this usage?
At 05:03 PM 9/1/2002 +0200, you wrote:
>Jesse Houwing wrote:
> >
> > In MySQL, PostgreSQL and such:
> >
> > SELECT * FROM table LIMIT startrow, numberofrows
> >
> > so the 15000th item en the 15 following it would be:
> >
> > SELECT * FROM table LIMIT 15000, 15
>
>Deprecated syntax for PostgreSQL. Use LIMIT ... OFFSET ... instead.
>
>SELECT * FROM table LIMIT 15 OFFSET 15000
>
>Jochem
>
>
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
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