Can't combine the where clause as they are different tables. You could do a
number of things:
1) As Chad suggested you could have to CFQueries and deal with them
together in your template or
2) If you don't want to deal with the result sets seperately you could
write a query/SP that deals with them before returning to your template
...it all depends what you want to do with it.
-----Original Message-----
From: Chad [mailto:[EMAIL PROTECTED]]
Sent: 16 August 2000 16:08
To: [EMAIL PROTECTED]
Subject: Re: Query a Query
Why cant you just query the database twice? Then CFOUTPUT each query where
you need it. Or combine your WHERE from each query into one.
<CFQUERY name="getRecord" datasource="DSTS" >
SELECT *
FROM DSTS.LLISTORAGE
WHERE (ENDITEMPN = '#FORM.ENDITEMPN#') AND (ENDITEMSN =
'#FORM.ENDITEMSN#')
ORDER BY ENDITEMPN ASC,ENDITEMSN ASC
</CFQUERY>
<CFQUERY name="getRecord1" datasource="DSTS">
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
</CFQUERY>
At 07:54 AM 8/16/00 -0700, you wrote:
>This is a wierd question, but I need to ask it.
>
>Is there a way to query the results of a query? There is a really reason
>whey I need to do this.
>
>Example
>
> <CFQUERY name="getRecord" datasource="DSTS" >
> SELECT *
> FROM DSTS.LLISTORAGE
> WHERE (ENDITEMPN = '#FORM.ENDITEMPN#') AND (ENDITEMSN =
>'#FORM.ENDITEMSN#')
> ORDER BY ENDITEMPN ASC,ENDITEMSN ASC
> </CFQUERY>
>
>Next one
>
> <CFQUERY name="getRecord1" maxrows="1">
> SELECT *
> FROM getRecord
> WHERE (LLIPN >= '#FORM.LLIPN#') AND (LLISN >
'#FORM.LLISN#')
> ORDER BY LLIPN ASC,LLISN ASC
> </CFQUERY>
>
>
>Thanks all
>
>Jim Ray
>
>
>
>---------------------------------------------------------------------------
---
>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.
----------------------------------------------------------------------------
--
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.
------------------------------------------------------------------------------
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.