Hello:
I'm a newbie to Progress. I just landed this new job here at our company. We're using Progress Version 6 and yes I realize we're a little behind the times. However, I'm trying to construct a query using Progress/SQL and I'm receiving the following error on the following SQL statements:
** Unable to understand after -- "FROM order ord". (247)
** Line 1 -- Invalid SQL statement. (945)
SELECT ord.ar-entity,ord.order-date,ord.cust-po,ord.order-no,
ord.qty-shipped
FROM order ord INNER JOIN po ON ord.ar-entity = po.ap-entity
WHERE ord.order-date BETWEEN 03/01/2008 AND 03/03/2008.
I appreciate any assistence you can give.
Regards
Regards
Suggestion #0... upgrade. Version 6 isn't merely ancient, obsolete and unsupported -- it is only of interest to historians and archaeologists. You're talking about a release that pre-dates Windows.
Suggestion #1... stop trying to use SQL. The Progress 4GL is NOT SQL and attempts to pretend that it is are doomed to failure. The SQL statements in Progress version 6 are SQL 89 and they exist primarily as a marketing checkbox. Nobody uses them. Your life is going to be worse than miserable if you insist on trying to use SQL to access a Progress database. If you really, really, really must use SQL then you desperately need to upgrade to version 10 (known as OpenEdge 10) and use the SQL-92 engine rather than the SQL statements embedded inside the 4GL.
For your query try something like:
FOR EACH ord NO-LOCK WHERE ord.order-date >= 03/01/2008 AND ord.order-date
EACH po NO-LOCK WHERE ord.ar-entity = po.ap-entity:
DISPLAY ord.ar-entity ord.order-date ord.cust-po ord.order-no ord.qty-shipped.
END.
SQL doesn't like the hyphens. Use double quotes e.g., Order."Order-date", not Order.Order-date.
But, good luck doing anything in V6