> 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.
That's good to know. :) I really should have qualified that first sentence
with "this might work in MS SQL" ... which is what I had intended to
express, but I guess I was in too much of a hurry and chose poor wording...
I'm not aware that sequences are available in either of MS databases... I'm
pretty sure they're not anyway...
Isaac
Certified Advanced ColdFusion 5 Developer
www.turnkey.to
954-776-0046
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.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