ASP VB query to Progress 10.2b

glennwontor

New Member
Been thrust into Progress land and am looking for some guidance :) The following query has seemed to stop working and I'm trying to determine why - I do know that the server QAD used to sit on went from AIX to Red Hat...I don't do a lot of SQL, but since it has worked in the past, my guess is that somewhere during a Progress upgrade or OS server change, the syntax of the query got changed along the way. Any ideas on how I can figure this out ? The following syntax error is generated by the ASP page... While I usually don't post until I'm stumped, "Syntax Error" doesn't quite help me enough, so here I am :)
Glenn

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Syntax error (7587)
/spgsales/On Time Shipment Report/On Time Shipment Report.asp, line 33


set rs = Conn.Execute("select tr_prod_line, " & _
" sum(- tr_qty_chg), " & _
" sum(if tr_effdate <= (tr_per_date + " & bufferdays & " ) then (- tr_qty_chg) else 0) / " & _
" (sum(if tr_effdate <= (tr_per_date + " & bufferdays & " ) then (- tr_qty_chg) else 0) + " & _
" sum(if tr_effdate > (tr_per_date + " & bufferdays & " ) then (- tr_qty_chg) else 0)), " & _
" pl_desc, " & _
" sum(if tr_effdate <= (tr_per_date + " & bufferdays & " ) then (- tr_qty_chg) else 0)" & _
" from tr_hist left join pl_mstr on tr_prod_line = pl_prod_line " & _
" where tr_effdate >= 1.1." & CStr(iy) & " and tr_part <> ""3TP400"" and tr_part <> ""3TP600"" and " & _
" tr_type = ""ISS-SO"" and tr_qty_req <> 0 and (tr_um = ""EA"" or tr_um = """") " & _
"group by tr_prod_line having sum(- tr_qty_chg) <> 0 ")
data = rs.getRows
rs.close
 
Top