S. Isaac Dealey wrote:
>
>>If you have some consecutive number use the MOD operator
>>in your WHERE.
>
> This might work provided there's never a problem inserting a record with an
> autonumber field in at least MS SQL Server ( a failed insert still chews up
> a record number ), and have never deleted anything from the table...
"some consecutive number" is not necessarily a table field. You could
just use a sequence on the fly if you don't have a consecutive number.
In PostgreSQL I would use:
CREATE SEQUENCE dummy_seq MINVAL 1 MAXVAL 1000000 CYCLE;
SELECT * FROM table WHERE nextval('dummy_seq') % 15 = 0;
I believe Oracle behaves about the same, but I am not sure if sequences
are available in MS SQL Server or Access.
Jochem
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
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