Data type mismatch in criteria expression

Moxioron

Active Member
Joined
Mar 17, 2008
Messages
436
Office Version
  1. 2019
Hello all.

I have a query that I am trying to reflect the summary of an expression from another query. Here is my SQL:

SELECT [Qry_VISA Re-Pricing Detail - Impact Analysis].Disposition8, Count([Qry_VISA Re-Pricing Detail - Impact Analysis].[Card Number]) AS [CountOfCard Number], Sum([Qry_VISA Re-Pricing Detail - Impact Analysis].[Credit Line]) AS [SumOfCredit Line], Sum([Qry_VISA Re-Pricing Detail - Impact Analysis].[Last Statement Balance]) AS [SumOfLast Statement Balance], Sum([Qry_VISA Re-Pricing Detail - Impact Analysis].[Last Statement Cash Balance]) AS [SumOfLast Statement Cash Balance], Sum([Qry_VISA Re-Pricing Detail - Impact Analysis].[Merch Balance]) AS [SumOfMerch Balance], Sum([Qry_VISA Re-Pricing Detail - Impact Analysis].[Avail$]) AS [SumOfAvail$]
FROM [Qry_VISA Re-Pricing Detail - Impact Analysis]
GROUP BY [Qry_VISA Re-Pricing Detail - Impact Analysis].Disposition8;

Disposition8 is an expression from Qry_VISA Re-Pricing Detail - Impact Analysis.

I want to provide a summary of each disposition I identified with my expression in the previous query. However, the SQL above gives me the Data type mismatch message.

Is it because I am using 'Group By' in this query on an expression?

Thanks.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Do all the fields you are summing have a numeric data type?
I would recommend starting from scratch, just adding the first field to the query and Grouping by it. Then, one-by-one, add your aggregate functions and check them until you find where the error is occurring. Then you will be able to identify the expression causing issues.
 
Upvote 0

Forum statistics

Threads
1,214,825
Messages
6,121,787
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top