- Joined
- May 19, 2015
- Messages
- 2
- Reaction score
- 0
I just started receiving the following message "The query cannot be completed. Either the size of the query result is larger than the maximum size of the database (2GB), or there is not enough temporary storage space on the disk to store the query result." I have compacted the database and even split the database into front and back end. The total size of the database is 3,840 KB so it's not even close to being 2GB. This is a query that has run perfectly fine everyday for many many months... I have included the SQL code below.
Code Start:
INSERT INTO Groups_Signed_All ( [HOME OFFICE], Company, [Group ID#], Grp_ID, [PAYABLE TO], Grp_Nm, SumOfPR_Cr, [Date (103F)], [TG Date], [Pay Request Noted in CPS], [Date of 1st Return], [Number of Members], [Number of Households], [Amount Requested], [QUARTERLY AMOUNT], [PR Rep], Director, Manager, [Date Pay Requested], [DATE APPROVED], FirstOfNotes, MaxOfDropDate, [First Payment Date], [Approved After TG Signed], Coordinator, [Approved By] )
SELECT [Approved ADMIN FEES].[HOME OFFICE], [Approved ADMIN FEES].Company, [Approved ADMIN FEES].[Group ID#], ADDC103F.Grp_ID, [Approved ADMIN FEES].[PAYABLE TO], AIADDEXT.GroupName, Sum(ADDC103F.PR_Cr) AS SumOfPR_Cr, Max(ADDC103F.Date) AS [Date (103F)], Max(AIADDEXT.TG13Date) AS [TG Date], [Approved ADMIN FEES].[Pay Request Noted in CPS], [Approved ADMIN FEES].[Date of 1st Return], [Approved ADMIN FEES].[Number of Members], [Approved ADMIN FEES].[Number of Households], [Approved ADMIN FEES].[Amount Requested], [Approved ADMIN FEES].[QUARTERLY AMOUNT], [Approved ADMIN FEES].[PR Rep], [Approved ADMIN FEES].Director, [Approved ADMIN FEES].Manager, [Approved ADMIN FEES].[Date Pay Requested], [Approved ADMIN FEES].[DATE APPROVED], First([Approved ADMIN FEES].Notes) AS FirstOfNotes, Max(Qpr_CPS_MailJob_Info.DropDate) AS MaxOfDropDate, [Approved ADMIN FEES].[First Payment Date], [Approved ADMIN FEES].[Approved After TG Signed], [Approved ADMIN FEES].Coordinator, [Approved ADMIN FEES].[Approved By]
FROM ((Qpr_CPS_MailJob_Info INNER JOIN ([Approved ADMIN FEES] INNER JOIN dbo_CPS_Group ON [Approved ADMIN FEES].CPS_ID = dbo_CPS_Group.CPS_GroupID) ON Qpr_CPS_MailJob_Info.ADDGroupID = dbo_CPS_Group.ADD_GroupID) INNER JOIN ADDC103F ON Qpr_CPS_MailJob_Info.ADDGroupID = ADDC103F.Grp_ID) INNER JOIN AIADDEXT ON (ADDC103F.Grp_ID = AIADDEXT.GroupID) AND (Qpr_CPS_MailJob_Info.Company = AIADDEXT.[origin_AisAIL,NisNIL])
GROUP BY [Approved ADMIN FEES].[HOME OFFICE], [Approved ADMIN FEES].Company, [Approved ADMIN FEES].[Group ID#], ADDC103F.Grp_ID, [Approved ADMIN FEES].[PAYABLE TO], AIADDEXT.GroupName, [Approved ADMIN FEES].[Pay Request Noted in CPS], [Approved ADMIN FEES].[Date of 1st Return], [Approved ADMIN FEES].[Number of Members], [Approved ADMIN FEES].[Number of Households], [Approved ADMIN FEES].[Amount Requested], [Approved ADMIN FEES].[QUARTERLY AMOUNT], [Approved ADMIN FEES].[PR Rep], [Approved ADMIN FEES].Director, [Approved ADMIN FEES].Manager, [Approved ADMIN FEES].[Date Pay Requested], [Approved ADMIN FEES].[DATE APPROVED], [Approved ADMIN FEES].[First Payment Date], [Approved ADMIN FEES].[Approved After TG Signed], [Approved ADMIN FEES].Coordinator, [Approved ADMIN FEES].[Approved By]
HAVING (((ADDC103F.Grp_ID) Is Not Null) AND (([Approved ADMIN FEES].[PAYABLE TO]) Not Like "*do not pay*") AND (([Approved ADMIN FEES].[Date Pay Requested]) Is Null Or ([Approved ADMIN FEES].[Date Pay Requested]) Like "")) OR (((ADDC103F.Grp_ID) Is Not Null) AND (([Approved ADMIN FEES].[PAYABLE TO]) Not Like "*do not pay*") AND (([Approved ADMIN FEES].[Date Pay Requested]) Is Null Or ([Approved ADMIN FEES].[Date Pay Requested]) Like "") AND (([Approved ADMIN FEES].[First Payment Date]) Is Null Or ([Approved ADMIN FEES].[First Payment Date]) Like ""));
Code Start:
INSERT INTO Groups_Signed_All ( [HOME OFFICE], Company, [Group ID#], Grp_ID, [PAYABLE TO], Grp_Nm, SumOfPR_Cr, [Date (103F)], [TG Date], [Pay Request Noted in CPS], [Date of 1st Return], [Number of Members], [Number of Households], [Amount Requested], [QUARTERLY AMOUNT], [PR Rep], Director, Manager, [Date Pay Requested], [DATE APPROVED], FirstOfNotes, MaxOfDropDate, [First Payment Date], [Approved After TG Signed], Coordinator, [Approved By] )
SELECT [Approved ADMIN FEES].[HOME OFFICE], [Approved ADMIN FEES].Company, [Approved ADMIN FEES].[Group ID#], ADDC103F.Grp_ID, [Approved ADMIN FEES].[PAYABLE TO], AIADDEXT.GroupName, Sum(ADDC103F.PR_Cr) AS SumOfPR_Cr, Max(ADDC103F.Date) AS [Date (103F)], Max(AIADDEXT.TG13Date) AS [TG Date], [Approved ADMIN FEES].[Pay Request Noted in CPS], [Approved ADMIN FEES].[Date of 1st Return], [Approved ADMIN FEES].[Number of Members], [Approved ADMIN FEES].[Number of Households], [Approved ADMIN FEES].[Amount Requested], [Approved ADMIN FEES].[QUARTERLY AMOUNT], [Approved ADMIN FEES].[PR Rep], [Approved ADMIN FEES].Director, [Approved ADMIN FEES].Manager, [Approved ADMIN FEES].[Date Pay Requested], [Approved ADMIN FEES].[DATE APPROVED], First([Approved ADMIN FEES].Notes) AS FirstOfNotes, Max(Qpr_CPS_MailJob_Info.DropDate) AS MaxOfDropDate, [Approved ADMIN FEES].[First Payment Date], [Approved ADMIN FEES].[Approved After TG Signed], [Approved ADMIN FEES].Coordinator, [Approved ADMIN FEES].[Approved By]
FROM ((Qpr_CPS_MailJob_Info INNER JOIN ([Approved ADMIN FEES] INNER JOIN dbo_CPS_Group ON [Approved ADMIN FEES].CPS_ID = dbo_CPS_Group.CPS_GroupID) ON Qpr_CPS_MailJob_Info.ADDGroupID = dbo_CPS_Group.ADD_GroupID) INNER JOIN ADDC103F ON Qpr_CPS_MailJob_Info.ADDGroupID = ADDC103F.Grp_ID) INNER JOIN AIADDEXT ON (ADDC103F.Grp_ID = AIADDEXT.GroupID) AND (Qpr_CPS_MailJob_Info.Company = AIADDEXT.[origin_AisAIL,NisNIL])
GROUP BY [Approved ADMIN FEES].[HOME OFFICE], [Approved ADMIN FEES].Company, [Approved ADMIN FEES].[Group ID#], ADDC103F.Grp_ID, [Approved ADMIN FEES].[PAYABLE TO], AIADDEXT.GroupName, [Approved ADMIN FEES].[Pay Request Noted in CPS], [Approved ADMIN FEES].[Date of 1st Return], [Approved ADMIN FEES].[Number of Members], [Approved ADMIN FEES].[Number of Households], [Approved ADMIN FEES].[Amount Requested], [Approved ADMIN FEES].[QUARTERLY AMOUNT], [Approved ADMIN FEES].[PR Rep], [Approved ADMIN FEES].Director, [Approved ADMIN FEES].Manager, [Approved ADMIN FEES].[Date Pay Requested], [Approved ADMIN FEES].[DATE APPROVED], [Approved ADMIN FEES].[First Payment Date], [Approved ADMIN FEES].[Approved After TG Signed], [Approved ADMIN FEES].Coordinator, [Approved ADMIN FEES].[Approved By]
HAVING (((ADDC103F.Grp_ID) Is Not Null) AND (([Approved ADMIN FEES].[PAYABLE TO]) Not Like "*do not pay*") AND (([Approved ADMIN FEES].[Date Pay Requested]) Is Null Or ([Approved ADMIN FEES].[Date Pay Requested]) Like "")) OR (((ADDC103F.Grp_ID) Is Not Null) AND (([Approved ADMIN FEES].[PAYABLE TO]) Not Like "*do not pay*") AND (([Approved ADMIN FEES].[Date Pay Requested]) Is Null Or ([Approved ADMIN FEES].[Date Pay Requested]) Like "") AND (([Approved ADMIN FEES].[First Payment Date]) Is Null Or ([Approved ADMIN FEES].[First Payment Date]) Like ""));