Short answer: No, you can't query the results of a query in Cold Fusion.
Long answer: There are alot better ways to do what you're trying to do. ;)

You could do several things through SQL, but aren't really what anyone would
recommend I don't think. Examples...

Combined query:
                SELECT  *
                FROM    DSTS.LLISTORAGE
                WHERE Primary_Key IN (
                                SELECT Primary_Key
                                FROM DSTS.LLISTORAGE
                                WHERE (ENDITEMPN = '#FORM.ENDITEMPN#')
                                        AND (ENDITEMSN = '#FORM.ENDITEMSN#')
                                ORDER BY ENDITEMPN ASC, ENDITEMSN ASC
                        )
                        AND (LLIPN >= '#FORM.LLIPN#')
                        AND (LLISN > '#FORM.LLISN#')
                ORDER BY  LLIPN ASC,LLISN ASC

I doubt this'd work, but...
                SELECT  *
                FROM    DSTS.LLISTORAGE
                WHERE (ENDITEMPN = '#FORM.ENDITEMPN#')
                        AND (ENDITEMSN = '#FORM.ENDITEMSN#')
                        AND (LLIPN >= '#FORM.LLIPN#')
                        AND (LLISN > '#FORM.LLISN#')
                ORDER BY  LLIPN ASC, LLISN ASC, ENDITEMPN ASC,ENDITEMSN ASC

If you're trying to do one query that you simply page through (last, next
kind of thing) just use one query and page through it with cfoutput:

<cfquery name="blah" cachedwithin=#CreateTimeSpan(0, 0, 30, 0)#
datasource="mydsn">...</cfoutput>

then...

<cfoutput query="blah" startrow=#IdOfNextRow# maxrows="1">

Also remember that a query is just an array. What I'd really recommend if
you're doing more than just a next/last type thing is to shove the query
into a variable then sort it and manipulate it to your heart's content.


Ed

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to