Data type mismatch in criteria expression

Moxioron

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

Some videos you may like

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,974
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,488
Messages
5,601,975
Members
414,487
Latest member
inxlsplot

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