Data type mismatch in criteria expression

Moxioron

Active Member
Joined
Mar 17, 2008
Messages
431
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

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
63,408
Office Version
  1. 365
Platform
  1. Windows
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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,673
Messages
5,838,706
Members
430,564
Latest member
Raeyven

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
Top