If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > How to format a join in Progress

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-30-09, 14:49
JamesWilliams JamesWilliams is offline
Registered User
 
Join Date: Jun 2009
Posts: 1
How to format a join in Progress

I am not new to databases, but am new to Progress. We use an app called Chempax on a Progress db, and I am trying to connect directly from Excel to get some data. It doesn't like this query, but doesn't say why. I suspect I have the JOIN formatted incorrectly, but not sure. I am reasonably sure I have the connection string correct. It connects, but the error says there's a problem with the query:

SELECT "BATCH-REC-HDR"."Batch-Num", "BATCH-REC-HDR"."Batch-Warehouse", "BATCH-REC-HDR"."Prod-Pkg-Code", "BATCH-REC-HDR"."Quantity-Manufactured",
"BATCH-REC-LABOR"."Type-1", "BATCH-REC-LABOR"."Labor-Code", SUM("BATCH-REC-LABOR"."Used-Time") AS SUMUSEDTIME, "BATCH-REC-LABOR"."Used-Time-UM",
"BATCH-REC-LABOR"."Cost-UM", SUM("BATCH-REC-LABOR".Cost) AS SUMCOST, SUM("BATCH-REC-LABOR"."Extended-Cost") AS SUMEXCOST,
"BATCH-REC-LABOR"."Created-date"
FROM "BATCH-REC-HDR" RIGHT OUTER JOIN
"BATCH-REC-LABOR" ON ("BATCH-REC-HDR"."Batch-Num" = "BATCH-REC-LABOR"."Batch-Num"
AND "BATCH-REC-HDR"."Batch-Warehouse" = "BATCH-REC-LABOR"."Batch-Warehouse")
WHERE ("BATCH-REC-HDR"."Batch-Warehouse" = '02-01') AND ("BATCH-REC-LABOR"."Created-date" > '1/1/2009')
GROUP BY "BATCH-REC-HDR"."Batch-Num", "BATCH-REC-HDR"."Batch-Warehouse", "BATCH-REC-HDR"."Prod-Pkg-Code", "BATCH-REC-HDR"."Quantity-Manufactured",
"BATCH-REC-LABOR"."Type-1", "BATCH-REC-LABOR"."Labor-Code", "BATCH-REC-LABOR"."Used-Time", "BATCH-REC-LABOR"."Used-Time-UM",
"BATCH-REC-LABOR"."Cost-UM", "BATCH-REC-LABOR"."Created-date"
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On