> I think I already know the answer to this but is there a way of
> determining the position in a recordset of a particular value
> without having to loop thru it.?  I have a recordset stored in
> an application variable which I want to query (CF 5) to find
> the pos of this record.  I then want to get everything else
> after it in the recordset.  I think the answer to this is I
> can't without looping thru all recs but I appear to have left
> my SQL hat at home today so I'm hoping one of you may prove
> me wrong :)

With a query of a query I think you would have to manually add an index
column, i.e.

<cfscript>
        myarray = arraynew(1);
        for (x = 1; x lte myquery.recordcount; x++) { myarray[x] = x; }
        QueryAddColumn(myquery,"index","myarray");
</cfscript>

( not sure off-hand about the quotes around myarray -- the cf studio help
says "arrayname" rather than "array" for the third argument )

but at this point you would be able to use

WHERE index >= #startrow#

in your query of query once you knew what row to start on

Isaac Dealey

www.turnkey.to
954-776-0046
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.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