Mykimus
New Member
Hi, everybody.
I've got a SQL statement I'm trying to run against an OpenEdge version 10.2B database. I've tried this thing every way to Sunday, and thus far it's kicking my rear. I'm hoping someone has seen this error before and can point me in the right direction...because my Progress/OpenEdge support provider is being more of a hindrance than a help!
Here's the error I'm getting when running the select:
Now...here's the statement. (And if anyone knows of a better way to get what I'm after, I'm certainly open to suggestions...)
As is hopefully evident, I have ;-delimited fields of monthly sales, cost, and qty values...and I need to accumulate them by each unique company/product/warehouse/year combination. If I simplify to just pull the sales values, it works fine. Just the cost - no problem. Just the units - works great. Any two of those - usually works ok. (Sometimes I get a timeout, but usually goes through fine.) However, when I hit it with the whole papaya, the error mentioned above is thrown almost immediately.
Has anyone seen anything like this?
Much thanks in advance for any assistance -
Mykimus
I've got a SQL statement I'm trying to run against an OpenEdge version 10.2B database. I've tried this thing every way to Sunday, and thus far it's kicking my rear. I'm hoping someone has seen this error before and can point me in the right direction...because my Progress/OpenEdge support provider is being more of a hindrance than a help!
Here's the error I'm getting when running the select:
HY000:[DataDirect][OpenEdge JDBC Driver][OpenEdge] Encountered internal error in SQL ENGINE at 1200 in Z:/vobs_sql/sql/src/sts/sts_aggrun.cxx. Contact Progress Technical Support
Now...here's the statement. (And if anyone knows of a better way to get what I'm after, I'm certainly open to suggestions...)
Code:
SELECT
CAST(SALES.company_no AS VARCHAR(10)) + '!' + UCASE(CAST(SALES.prod AS VARCHAR(20))) + '!' + UCASE(CAST(SALES.whse AS VARCHAR(10))) + '!' + CAST(SALES.yr AS VARCHAR(4)) AS "record_id",
SUM(SALES.salesamt[1]) AS "jan_sales",
SUM(SALES.salesamt[2]) AS "feb_sales",
SUM(SALES.salesamt[3]) AS "mar_sales",
SUM(SALES.salesamt[4]) AS "apr_sales",
SUM(SALES.salesamt[5]) AS "may_sales",
SUM(SALES.salesamt[6]) AS "jun_sales",
SUM(SALES.salesamt[7]) AS "jul_sales",
SUM(SALES.salesamt[8]) AS "aug_sales",
SUM(SALES.salesamt[9]) AS "sep_sales",
SUM(SALES.salesamt[10]) AS "oct_sales",
SUM(SALES.salesamt[11]) AS "nov_sales",
SUM(SALES.salesamt[12]) AS "dec_sales",
SUM(SALES.cogamt[1]) AS "jan_cogs",
SUM(SALES.cogamt[2]) AS "feb_cogs",
SUM(SALES.cogamt[3]) AS "mar_cogs",
SUM(SALES.cogamt[4]) AS "apr_cogs",
SUM(SALES.cogamt[5]) AS "may_cogs",
SUM(SALES.cogamt[6]) AS "jun_cogs",
SUM(SALES.cogamt[7]) AS "jul_cogs",
SUM(SALES.cogamt[8]) AS "aug_cogs",
SUM(SALES.cogamt[9]) AS "sep_cogs",
SUM(SALES.cogamt[10]) AS "oct_cogs",
SUM(SALES.cogamt[11]) AS "nov_cogs",
SUM(SALES.cogamt[12]) AS "dec_cogs",
SUM(SALES.qtysold[1]) AS "jan_units",
SUM(SALES.qtysold[2]) AS "feb_units",
SUM(SALES.qtysold[3]) AS "mar_units",
SUM(SALES.qtysold[4]) AS "apr_units",
SUM(SALES.qtysold[5]) AS "may_units",
SUM(SALES.qtysold[6]) AS "jun_units",
SUM(SALES.qtysold[7]) AS "jul_units",
SUM(SALES.qtysold[8]) AS "aug_units",
SUM(SALES.qtysold[9]) AS "sep_units",
SUM(SALES.qtysold[10]) AS "oct_units",
SUM(SALES.qtysold[11]) AS "nov_units",
SUM(SALES.qtysold[12]) AS "dec_units"
FROM
PUB.SALES AS SALES
WHERE
AND SALES.company_no = '1'
GROUP BY
"record_id"
As is hopefully evident, I have ;-delimited fields of monthly sales, cost, and qty values...and I need to accumulate them by each unique company/product/warehouse/year combination. If I simplify to just pull the sales values, it works fine. Just the cost - no problem. Just the units - works great. Any two of those - usually works ok. (Sometimes I get a timeout, but usually goes through fine.) However, when I hit it with the whole papaya, the error mentioned above is thrown almost immediately.
Has anyone seen anything like this?
Much thanks in advance for any assistance -
Mykimus