Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Translate SQLServer qry to Access qry

Status
Not open for further replies.

ri

Programmer
Nov 2, 2000
12
GB
Does anyone know how to make this SQL Server qry run in Access?

SELECT Destination, CallType, ContractName, ICNumber, SUM(Calls) AS SumOfCalls, SUM(Minutes) AS SumOfMinutes, SUM(DollarCharge) as SumOfDollarCharge, SUM(DollarCharge)/SUM(Minutes) AS DollarCPM
FROM DATA
GROUP BY Destination, ContractName, ICNumber, CallType WITH CUBE
HAVING (grouping(Destination) = 0 AND grouping(ContractName) = 0 AND grouping(ICNumber) = 0 AND grouping(CallType) = 0) OR (grouping(Destination) = 0 AND grouping(ContractName) = 1 AND grouping(ICNumber) = 1 AND grouping(CallType) = 0) OR (grouping(Destination) = 1 AND grouping(ContractName) = 1 AND grouping(ICNumber) = 1 AND grouping(CallType) = 0)
ORDER BY DESTINATION DESC, CALLTYPE, CONTRACTNAME DESC

Thanks....
 
I have been told to use a pass through query.

However I am having problems with my parameters
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top