You have a comma out of place. try changing:
ISNull(count(go.dMonthlyEventDate, 0)) as EventCount,
to
ISNull(count(go.dMonthlyEventDate),0) as EventCount,
It also looks like you have an extra comma on your FROM line, but the above
is what's causing your count error message.
Bob
-----Original Message-----
From: Julie Clegg [mailto:[EMAIL PROTECTED]]
Sent: May 14, 2001 4:36 PM
To: CF-Talk
Subject: SQL - Count Function Error
Hello,
I am trying to run this MS SQL query and I keep getting the following error:
"The count function requires 1 arguments"...
her is my query:
<cfquery name="QRYEventTotals" datasource="#request.ProjectAceDB#">
Select cd1.vCodeDecodeDesc as EventTypeDesc,
ISNull(count(go.dMonthlyEventDate, 0)) as EventCount,
IsNull(count(go2.dMonthlyEventDate, 0)) as EventCount2
>From CMGoal go, , CMgoal go2, CodeDecode cd1
where (go.cEventTypeID = cd1.icodedecodeid
AND go.dMonthlyEventDate = #variables.dMonthYear#
AND (go.dStartDate > 0)
OR (go2.cEventTypeID = cd1.icodedecodeid
AND go2.dMonthlyEventDate = #variables.dMonthYear#
AND go2.dAchieveDate > 0)
Group by EventTypeDesc
</cfquery>
Does anyone know what it doesnt like?
TIA
Julie
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists