Also, I'm using an Access DB.
John
> Hello All,
>
> I have a problem with a query that works on my CF developer's 7.0.2.
> 142559 server. However, when it runs on 7.0.1.116466 I get the
> following error:
>
> [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC
> Microsoft Access Driver] Too few parameters. Expected 9.
>
> The query is:
>
>
> <!--- Returns Turn Around Time for book Orders --->
> <cffunction name="getOrderCompl" returntype="query">
> <!--- do not inlude orderType of 3 or 7 (AV, Ebook) --->
> <cfargument name="startdate" type="date">
> <cfargument name="enddate" type="date">
> <cfquery name="qGetOrders"
> datasource="#APPLICATION.datasource#">
> SELECT DateDiff("d",p.DateCreated,i.DateRecd) AS
> sumDiff,
> v.vendorPk,v.vendorName,
> p.poId
> FROM ((Vendor v INNER JOIN P_PoNumber p ON v.VendorpK =
> p.vendor)
> INNER JOIN P_Invoice i ON i.poNumber = p.poId)
> WHERE i.dateRecd BETWEEN <cfqueryparam
> cfsqltype="cf_sql_date"
> value="#ARGUMENTS.startDate#"> AND <cfqueryparam
> cfsqltype="cf_sql_date" value="#ARGUMENTS.enddate#">
> AND (i.OrderType = <cfqueryparam
> cfsqltype="cf_sql_integer"
> value="1"> OR
> i.OrderType = <cfqueryparam
> cfsqltype="cf_sql_integer" value="4">
> OR
> i.OrderType = <cfqueryparam
> cfsqltype="cf_sql_integer" value="5">
> OR
> i.OrderType = <cfqueryparam
> cfsqltype="cf_sql_integer" value="6">
> OR
> i.OrderType = <cfqueryparam
> cfsqltype="cf_sql_integer" value="8">
> OR
> i.OrderType = <cfqueryparam
> cfsqltype="cf_sql_integer"
> value="9">)
> ORDER BY v.vendorname
> <!---GROUP BY v.vendorPk,v.vendorName,p.Poid,sumDiff--->
> </cfquery>
> <!--- Gets and Sums total number of days between PODate and
> InvReceived date --->
> <cfquery name="qGetDateDiff" dbtype="query">
> SELECT AVG(sumDiff) AS avgDiff,
> vendorPk,
> vendorName
> FROM qGetOrders
> WHERE sumDiff > <cfqueryparam
> cfsqltype="cf_sql_integer"
> value="0">
> GROUP BY vendorPk,vendorName
> ORDER BY vendorPk
> </cfquery>
> <cfreturn qGetDateDiff>
> </cffunction>
>
>
> Thanks in advance,
>
> John
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4267
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15