'Overflow' Message on a Query

Moxioron

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

I put together a query (see SQL below) and it worked great until I put criteria for the Percent Available Expression. I only want the query to return 25% or greater.

Where am I going astray?

Thank you.

SELECT [tbl_Card Holder Journal Report_Update].[Account Identifier], [tbl_Quest Scores May 2012].[Member Number], [tbl_Quest Scores May 2012].[Primary Name], [tbl_Card Holder Journal Report_Update].[Address Line One Text], [tbl_Card Holder Journal Report_Update].[Address Line Two Text], [tbl_Card Holder Journal Report_Update].[Address City Name], [tbl_Card Holder Journal Report_Update].[Address State Name], [tbl_Card Holder Journal Report_Update].[Address Postal Code], [tbl_Quest Scores May 2012].[Open Date], [tbl_Card Holder Journal Report_Update].[Credit Available Amount], [tbl_Card Holder Journal Report_Update].[Account Balance Total Amount], [tbl_Card Holder Journal Report_Update].[Credit Line Amount], [tbl_Card Holder Journal Report_Update]![Credit Available Amount]/[tbl_Card Holder Journal Report_Update]![Credit Line Amount] AS [Percent Available], [tbl_Quest Scores May 2012].[FICO 0512], Mid([Account Identifier],5,4) AS PRIN, [tbl_Estatement Enrollment].[E-mail Address]
FROM [tbl_Estatement Enrollment] RIGHT JOIN ([tbl_Quest Scores May 2012] INNER JOIN [tbl_Card Holder Journal Report_Update] ON [tbl_Quest Scores May 2012].[Card Number] = [tbl_Card Holder Journal Report_Update].[Account Identifier]) ON [tbl_Estatement Enrollment].[Card Number] = [tbl_Quest Scores May 2012].[Card Number]
GROUP BY [tbl_Card Holder Journal Report_Update].[Account Identifier], [tbl_Quest Scores May 2012].[Member Number], [tbl_Quest Scores May 2012].[Primary Name], [tbl_Card Holder Journal Report_Update].[Address Line One Text], [tbl_Card Holder Journal Report_Update].[Address Line Two Text], [tbl_Card Holder Journal Report_Update].[Address City Name], [tbl_Card Holder Journal Report_Update].[Address State Name], [tbl_Card Holder Journal Report_Update].[Address Postal Code], [tbl_Quest Scores May 2012].[Open Date], [tbl_Card Holder Journal Report_Update].[Credit Available Amount], [tbl_Card Holder Journal Report_Update].[Account Balance Total Amount], [tbl_Card Holder Journal Report_Update].[Credit Line Amount], [tbl_Quest Scores May 2012].[FICO 0512], [tbl_Estatement Enrollment].[E-mail Address]
HAVING ((([tbl_Card Holder Journal Report_Update]![Credit Available Amount]/[tbl_Card Holder Journal Report_Update]![Credit Line Amount])>0.24) AND (([tbl_Quest Scores May 2012].[FICO 0512])>699 And ([tbl_Quest Scores May 2012].[FICO 0512])<9000));
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Do any of the lines have a Credit line Amount of 0?
Division by 0 will give you an overflow error or a DIV/0 error.

That being the case you can filter out 0 values by putting

Code:
WHERE [tbl_Card Holder Journal Report_Update]![Credit Line Amount]<>0 OR [tbl_Card Holder Journal Report_Update]![Credit Line Amount] IS NOT NULL
just before the GROUP BY clause

Denis
 
Upvote 0

Forum statistics

Threads
1,207,284
Messages
6,077,527
Members
446,287
Latest member
tjverdugo85

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