L
Love Buzz
Hello all.
Please see the SQL below of the queury I am building. The queury worked
fine until I set criteria to count only fields that contain the word 'Over
Drawn'. I get the message 'This expression is typed incorrectly, or it is
too complex to be evaluated'.
When I take the criteria out it adds up everything fine.
It's the (((Count([Incoming Return Item Detail].MemoPostStatus))="Over
Drawn"));
part at the bottom.
Any suggestions? Thanks for your help.
SELECT [Incoming Return Item Detail].DepositingAccount, [RCC Customer
List].[Customer Name], [RCC Customer List].[Sub Product], [RCC Customer
List].[Date Opened], Count([Incoming Return Item Detail].ReturnReason) AS
CountOfReturnReason, [CountOfReturnReason]/[Numb of Dep Items] AS Expr1,
Sum([Incoming Return Item Detail].ItemAmount) AS SumOfItemAmount, [RCC
Customer List].[Officer Code], [SumOfItemAmount]/[$$ of Dep Items] AS Expr2,
Count([Incoming Return Item Detail].MemoPostStatus) AS CountOfMemoPostStatus
FROM [RCC Customer List] INNER JOIN [Incoming Return Item Detail] ON [RCC
Customer List].[Account #] = [Incoming Return Item Detail].DepositingAccount
WHERE ((([Incoming Return Item Detail].Date) Between [Start Date] And [End
Date]))
GROUP BY [Incoming Return Item Detail].DepositingAccount, [RCC Customer
List].[Customer Name], [RCC Customer List].[Sub Product], [RCC Customer
List].[Date Opened], [RCC Customer List].[Officer Code], [RCC Customer
List].[Numb of Dep Items], [RCC Customer List].[$$ of Dep Items]
HAVING (((Count([Incoming Return Item Detail].MemoPostStatus))="Over Drawn"));
Please see the SQL below of the queury I am building. The queury worked
fine until I set criteria to count only fields that contain the word 'Over
Drawn'. I get the message 'This expression is typed incorrectly, or it is
too complex to be evaluated'.
When I take the criteria out it adds up everything fine.
It's the (((Count([Incoming Return Item Detail].MemoPostStatus))="Over
Drawn"));
part at the bottom.
Any suggestions? Thanks for your help.
SELECT [Incoming Return Item Detail].DepositingAccount, [RCC Customer
List].[Customer Name], [RCC Customer List].[Sub Product], [RCC Customer
List].[Date Opened], Count([Incoming Return Item Detail].ReturnReason) AS
CountOfReturnReason, [CountOfReturnReason]/[Numb of Dep Items] AS Expr1,
Sum([Incoming Return Item Detail].ItemAmount) AS SumOfItemAmount, [RCC
Customer List].[Officer Code], [SumOfItemAmount]/[$$ of Dep Items] AS Expr2,
Count([Incoming Return Item Detail].MemoPostStatus) AS CountOfMemoPostStatus
FROM [RCC Customer List] INNER JOIN [Incoming Return Item Detail] ON [RCC
Customer List].[Account #] = [Incoming Return Item Detail].DepositingAccount
WHERE ((([Incoming Return Item Detail].Date) Between [Start Date] And [End
Date]))
GROUP BY [Incoming Return Item Detail].DepositingAccount, [RCC Customer
List].[Customer Name], [RCC Customer List].[Sub Product], [RCC Customer
List].[Date Opened], [RCC Customer List].[Officer Code], [RCC Customer
List].[Numb of Dep Items], [RCC Customer List].[$$ of Dep Items]
HAVING (((Count([Incoming Return Item Detail].MemoPostStatus))="Over Drawn"));