At the risk of having seventeen other people tell you how to do it...
All that this code...
does is:
Try using instead.
Also if you want to create a query based on another query, you have to loop
over the first query, create the new query, and then output that query:
SELECT * FR
PROTECTED]]
Sent: Tuesday, March 13, 2001 10:03 AM
To: CF-Talk
Subject: RE: nesting queries
Considering that do a simple join on the two tables
to obtain results in one recordset.
Thus:
One Query: cfouput query=qyrAllEmp
All variables would be: qryAllEmp.fieldnames
Then you only need one CFOUTPUT
Employees.Office LIKE '#office#%'
AND tblEmployees.EMPID = tblEquipment.EquipID
ORDER BY tblEmployees.lname
-Original Message-
From: Jones, Becky [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 10:01 AM
To: CF-Talk
Subject: RE: nestin
SELECT * from tblEquipment
WHERE EquipID = #iEquipID#
-Original Message-
From: Adkins, Randy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 9:49 AM
To: CF-Talk
Subject: RE: nesting queries
Then it is possible that the 2nd Query returns no records,
Can you show me both q
Then it is possible that the 2nd Query returns no records,
Can you show me both queries
-Original Message-
From: Jones, Becky [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 9:45 AM
To: CF-Talk
Subject: RE: nesting queries
i tried that and i only get results from the first
#
-Original Message-
From: Adkins, Randy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 8:58 AM
To: CF-Talk
Subject: RE: nesting queries
You can place a CFOUTPUT at the very top
of the Queries and instead of using CFOUTPUT QUERY,
use a CFLOOP Query just make sure when you are
outputing
it's a matter of how u do your query. in this case, u do one query, and use
agreggratataacrap functions. sorry i have stutter problems. the thing is,
u have to call out every column individually, instead of using the asterisk
*. here is an example. notice i am using aliases
SELECT a.EMPID,
You can place a CFOUTPUT at the very top
of the Queries and instead of using CFOUTPUT QUERY,
use a CFLOOP Query just make sure when you are
outputing the query results you use the prefix
for the given query
Example:
CFOUPUT
CFLOOP QUERY=Query1
#Query1.MYFIELD#
CFLOOP Query=Query
a new city is reached, this inner loop stops and the process starts
>over again with the first CFOUTPUT.
>
>Hope this helps. If this wasn't what you were trying to do, well now you
>know!
>
>Norman Elton
>Information Technology
>College of William & Mary
>
>
Well I see responses are rolling, and I've already noticed a problem in
mine... the CFQUERY line should read:
Insert the name of your datasource (as configured in the CF Administrator)
into the "...".
Norman Elton
Information Technology
College of William & Mary
--
-Original Message-
From: Mark Ireland [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 13, 2000 9:13 PM
To: [EMAIL PROTECTED]
Subject: Re: nesting queries
Its is as easy as
>where city = '#cities.city#'
At 09:09 PM 13/08/00 -0400, you wrote:
>also a novice, and am
You've almost got it. Try this:
select city
from areas
#city#
select neighborhood
from areas
where city = '#city#'
#neighborhoods.neighborhood#
HTH,
Sharon
At 09:09 PM 8/13/2000 -0400, Mark Davies wrote:
>also a novice, and am stuck. Am tryin
Its is as easy as
>where city = '#cities.city#'
At 09:09 PM 13/08/00 -0400, you wrote:
>also a novice, and am stuck. Am trying to nest a query theoretically like
>the following...
>
>
> select city
> from areas
>
>
>#city#
>
>
>select neighborhood
>from areas
>
On 4/7/00, B. Cravens penned:
>Either use for each query that needs to be
>nested, or you could include each query as a custom tag.
You can?
Bud Schneehagen - Tropical Web Creations
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://ww
> Hello all,
> I would like to know how you guys are nesting queries?
> i have to "Nest" multiple queries like
>
>
>
>
> ---
>
> --
>
>
>
>
> How can i do this?
> Thanks inadvance
You can use loops instead:
Why do you have to nest them???
If you are looking to loop over the results do this...
#query1_info#
---#query2_info#
--#query3_info#
Ther probably is a more graceful way to handle what your trying to do - but
witout more information on what that is...
this is th
Either use for each query that needs to be
nested, or you could include each query as a custom tag.
Billy Cravens
[EMAIL PROTECTED]
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 07, 2000 9:43 AM
Subject: nesting queries??
>
> Hello all
You could use cfloop instead of the two inner cfoutput tags.
HTH,
Curt
Curtis C. Layton
Web Applications Developer
Words In Progress, Inc.
(410) 667-4986
[EMAIL PROTECTED]
http://www.wordsinprogress.com
Wu-Tang Alias: 100-Watt Warlock
- Original Message -
From: <[EMAIL PROTECTED]>
To: <
18 matches
Mail list logo