ABL to SQL convertion tool

Cecil

19+ years progress programming and still learning.
Hi not sure if my question should be here under this section of this forum.

I need to convert some basic ABL queries into SQL and I through that there was a Progress/OpenEdge tool to this.

I do not know SQL very well I need to be able to explain some off my ABL reports and show the quires as SQL.

Here is an example of my ABL querie.

Code:
    [COLOR=navy][FONT=&quot]FOR EACH members NO-LOCK[/FONT][/COLOR]
  [COLOR=navy][FONT=&quot]    WHERE members.number  GT 500 [/FONT][/COLOR]
  [COLOR=navy][FONT=&quot]      AND MEmbers.stat    NE 'D'[/FONT][/COLOR]
  [COLOR=navy][FONT=&quot]      AND (MEMBERs.METHOD EQ 'CARD' OR [/FONT][/COLOR]
  [COLOR=navy][FONT=&quot]           MEMBERs.METHOD EQ 'MANUAL'),[/FONT][/COLOR]
  [COLOR=navy][FONT=&quot]    FIRST Pay_terms NO-LOCK [/FONT][/COLOR]
  [COLOR=navy][FONT=&quot]    WHERE Pay_Terms.terms EQ Members.terms[/FONT][/COLOR]
  [COLOR=navy][FONT=&quot]      AND Pay_Terms.EXPIRE EQ FALSE [/FONT][/COLOR]
  [COLOR=navy][FONT=&quot]    BREAK BY Members.Bill_Date:[/FONT][/COLOR]
  
  [COLOR=navy][FONT=&quot]    IF FIRST-OF(Members.Bill_Date) THEN[/FONT][/COLOR]
  [COLOR=navy][FONT=&quot]        inCount = 0.[/FONT][/COLOR]
  
  [COLOR=navy][FONT=&quot]    inCount = inCount + 1.[/FONT][/COLOR]
  
  [COLOR=navy][FONT=&quot]    IF LAST-OF(Members.Bill_Date) THEN[/FONT][/COLOR]
  [COLOR=navy][FONT=&quot]        EXPORT STREAM sOutput DELIMITER ',' members.terms Members.Bill_Date Members.Acct_Status inCount.[/FONT][/COLOR]
  
  [COLOR=navy][FONT=&quot]END.[/FONT][/COLOR]
So how do I convert ABL quires into SQL?

Using OE 10.2A.
 

tamhas

ProgressTalk.com Sponsor
There is a tool for moving schema to a SQL database and Bravepoint has an OpenEdge to SQL replication tool, but I doubt that there is a tool for moving queries. ABL is record oriented and SQL is set oriented, which is quite a semantic mismatch. This can easily mean having to approach a problem from a very different direction, e.g., SQL doesn't have any of that first-of and last-of stuff, nor the ability to stick an arithmetic expression in the middle of a loop. Instead, you would use GROUP-BY to summarize by terms, bill_date, status, and include COUNT(). I'm a little rusty on what to put in the () for COUNT here, but a little experimentation should help.
 
Top