they are called from reports. See following for example:<br><br><CFPARAM name="szDate" default=#DateFormat(Now(), "mm/dd/yy"

#><br><br><cfoutput><br><br><CFQUERY NAME="GetStatusData" DATASOURCE="Sites"><br> (SELECT plant, status, status_date, N1, Start_Date,<br> (Select count(*) FROM punch_list_tbl<br> WHERE resp_person = 'test_person' <br> AND status = 'Open'<br> AND plant = checklist_tbl.plant) as test_open, <br> (Select count(*) FROM punch_list_tbl<br> WHERE resp_person = 'developer' <br> AND status = 'Open'<br> AND plant = checklist_tbl.plant) as devel_open <br> FROM checklist_tbl<br> where N1 <> 'C' <br> ORDER by Start_Date, plant)<br></cfquery><br><br><html><br><head><br> <title>Untitled</title><br></head><br><br><body><br><br><cfloop query=GetStatusData><br><CFSET nWeek = #DateDiff("WW", Start_Date, Now())# + 1><br><CFQUERY DATASOURCE="GeneralArchive"><br>INSERT INTO StatusSnapshot_tbl (SnapshotDate, Plant, nweek, testopen, developen, status, statusdate)<br> Values ('#szDate#', '#Plant#', '#nWeek#', '#test_open#', '#devel_Open#', '#Status#', '#Status_Date#') <br></cfquery><br></cfloop><br><br><br><CFOUTPUT><br><b>Snapshot complete</b><br></cfoutput><br><BR><br><br><br><br><br><CENTER><A HREF="new_checklist_home.cfm"><B><Font color="RED">Back To Menu</font></b></A></center><br><br></body><br></html><br>