dennis1000
Programmer
I am attempting to average a column of mumbers in a table. Did a search of threads that poroduced no results. I found the SQL statement in Que's text but cannot find any info on how to output it on a page. The data source is called ratepay, the table is called ratepay, access db is called rate and the table field is called Salary. Here's my start:
<CFQUERY NAME="GetAveSalary" DATASOURCE="ratepay">
SELECT AVG (Salary)
FROM ratepay
WHERE 0=0
</CFQUERY>
<html><body>
<CFOUTPUT Query="GetAveSalary">
#Salary#
</CFOUTPUT>
</body></html>
What am I doing wrong? Thanks for your help in advance.
<CFQUERY NAME="GetAveSalary" DATASOURCE="ratepay">
SELECT AVG (Salary)
FROM ratepay
WHERE 0=0
</CFQUERY>
<html><body>
<CFOUTPUT Query="GetAveSalary">
#Salary#
</CFOUTPUT>
</body></html>
What am I doing wrong? Thanks for your help in advance.