Ok someone helped me with something similar before.  Basically I initially
run a query based on a set
of dates and pull ALL records within that date range (simple enough):
<CFQUERY datasource="#DSN#" name="qgetwild">
SELECT O_Report_Num, O_Period_dt_Beg, O_WildLife, O_Bird_Strikes, O_K9, 
O_Small_Mammals, O_Flocks_of_Birds, O_WildLife_Incidents
FROM Operations
WHERE O_Period_dt_Beg BETWEEN #CREATEODBCDate(form.wild_dt1)# AND
#CREATEODBCDate(form.wild_dt2)#
AND O_Wildlife > 0
ORDER BY O_Period_dt_Beg
</CFQUERY>

Then I have another query I run just to get airport runway names.

<CFQUERY datasource="#dsn#" name="qgetrunways">
SELECT *
FROM Runways
</CFQUERY>

<CFOUTPUT query="qgetwild">
Then in the output I have a few variables that print out from the first
query. Where the airport runways come into play
is if there were any problems reported about a runway for a particular
airport. So for instance Query qgetwild may bring
back FIVE records. In this output I want each record and its variables to
print out one at a time. Thats very easy But then when I do the 3rd query: 

<CFQUERY datasource="#dsn#" name="qgetrunwaydetail">
SELECT runway_ID
FROM Runway_Detail
WHERE O_Report_Num = #qgetwild.O_Report_Num#
</CFQUERY> 

which takes A SPECIFIC qgetwild record and sees what runways were reported
on it only will pick up the
FIRST qgetwild record.  And I have trouble outputting it too since I am
already in an output if I close it and open
a new one then it shows all the runways for all the reports as one instead
of listing each runway with its associated
report.  Point is I cant get it to print out like this:

Report Number: 1
Wild Life: Birds
Date: 01/02/00
Runways Affected: Runway 2 & Runway 4

Report Number: 2
Wild Life: Birds
Date: 01/03/00
Runways Affected: Runway 3 & Runway 4

Instead the only 2 ways I could get to work were either all reports
reporting the same runway.
Report Number: 1
Wild Life: Birds
Date: 01/02/00
Runways Affected: Runway 2

Report Number: 2
Wild Life: Birds
Date: 01/03/00
Runways Affected: Runway 2

Or all the runways showing up at the end:

Report Number: 1
Wild Life: Birds
Date: 01/02/00

Report Number: 2
Wild Life: Birds
Date: 01/03/00

Runways Affected: Runway 2 & Runway 4 & Runway 3

</CFOUTPUT>

Any suggestions on how to get it to output the FIRST way would be
appreciated. I am still new to this so just don't know all the capabilities.
Thanks
Kelly

------------------------------------------------------------------------------
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