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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need count of items in query

Status
Not open for further replies.

merlynsdad

Programmer
Nov 18, 2010
175
US
I have a query of all calls into a callsite. Those that were transferred from someplace show the number dialed; those that were dialed direct I have blanked the number (ending in 7650) with the expression
Code:
CallTrfdFrom: IIf(Right([calldata_b],4)<>"7650",Right([calldata_b],10))
I would like to count the instances of calls transferred so i can get a percentage, but I'm not sure how to do this.

If the square peg won't fit in the round hole, sand off the corners.
 
CountDrictDiled:sum(iif(Right([calldata_b],4)<>"7650",1,0))

also you have to add a group by
 
It's telling me I can't have an aggregate function in a group by clause.

If the square peg won't fit in the round hole, sand off the corners.
 
group by IIf(Right([calldata_b],4)<>"7650",Right([calldata_b],10))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top