cancel
Showing results for 
Search instead for 
Did you mean: 

I run out of memory when trying to run a query

Former Member
0 Kudos

I need help with a query. I am trying to extract Total Qty Sold ( and eventually get this data by month), but when I would run the query asking for QTY I get "System Out Of Memory". I removed that party of the query asking for Qty and posted what I came up with below. Any Help is greatly appreciated.

SELECT T0.[ItemCode], T0.[ItemName], T1.[FirmName], T0.[CardCode], T0.[SuppCatNum], T2.[ItmsGrpNam], T0.[U_U_CMG_PROGRAM], T0.[U_U_CMG_CATEG], T0.[U_CMG_STATUS], T0.[U_CMG_STORES], T0.[U_CMG_COLOR], T0.[U_CMG_LOCAT], T0.[MinLevel], T0.[MinOrdrQty]

FROM OITM T0 INNER JOIN OMRC T1 ON T0.FirmCode = T1.FirmCode INNER JOIN OITB T2 ON T0.ItmsGrpCod = T2.ItmsGrpCod

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Welcome you post on the forum.

Try this fist:

SELECT T0.ItemCode, T0.ItemName, T1.FirmName, T0.CardCode, T0.SuppCatNum, T2.ItmsGrpNam, T0.MinLevel, T0.MinOrdrQty

FROM OITM T0

INNER JOIN OMRC T1 ON T0.FirmCode = T1.FirmCode

INNER JOIN OITB T2 ON T0.ItmsGrpCod = T2.ItmsGrpCod

WHERE T0.ItemCode Like '[%0\]%'

Thanks,

Gordon

Former Member
0 Kudos

This works fine. The problem that I have with the query that I submitted, happens when I add 'Quantity" field from table "DLN1" My goal is to get the quantity sold or sales for a given month, per line item.

Former Member
0 Kudos

Show your query here.

Former Member
0 Kudos

SELECT T0.[ItemCode], T0.[ItemName], T1.[FirmName], T0.[CardCode], T0.[SuppCatNum], T2.[ItmsGrpNam], T0.[U_U_CMG_PROGRAM], T0.[U_U_CMG_CATEG], T0.[U_CMG_STATUS], T0.[U_CMG_STORES], T0.[U_CMG_COLOR], T0.[MinLevel], T0.[MinOrdrQty], T3.[LineTotal]

FROM OITM T0 INNER JOIN OMRC T1 ON T0.FirmCode = T1.FirmCode INNER JOIN OITB T2 ON T0.ItmsGrpCod = T2.ItmsGrpCod INNER JOIN RDR1 T3 ON T0.ItemCode = T3.ItemCode

Former Member
0 Kudos

Gordon,

I got it to run, I'm running it from SQ!L manager on the server. I am pulling much information and my desktop could handle it. I have one other question, but I will close out this one and re post the question.

Answers (0)