> Isaac,
> This won't work either, because it is possible that some
> of the ID's between 2 and 52 did not match your original
> WHERE clause in the first query. Say qry1.id[1] was 2 and
> qry1.id[50] was 10,000. Then in your second query, you are
> pulling almost 10,000 records, instead of the 50 that you
> wanted! Again, this is why my original post used the ID IN
> () to only get the records you wanted.
Oh... duh... well, you know... not having done that before, I got
confused by the description of it. :) Yeah, you'd have to get a
list... though it occurs to me there's a reasonably simple regular
expression that might be more efficient than the loop:
ids = rereplace(valuelist(qry1.id),"^([^,]+,){50,50}(([^,]+,?){1,50}).
*$","\2")
granted, you've got to drop the first part for the first 50, but it
oughta work for the remaining pages...
> I went through this discussion by myself about a year ago
> when I came up with this :) Funny to see everyone has sort
> of the same though process.
Heh... yeah, it's like people misspelling my name -- everybody spells
it wrong, but everybody spells it wrong in exactly the same way.
> Also, this solution works
> independent of the DB, whether it be Access, MySQL, etc,
> since no sub-queries are needed.
I always consider that a plus. :)
s. isaac dealey 954.522.6080
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217078
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54