[Stackoverflow] [Progress OpenEdge ABL] How do I join 3 tables? Progress4gl

Status
Not open for further replies.
A

a.omz

Guest
I have a problem - I need help please.

So I have a spreadsheet it has "members" numbers that I need to compare with a database. If the spreadsheet data doesn't match- then I don't do anything. If it does match, I need to update the database.

The problem is that I think I need to call 3 tables: Account, Members and Signatory. I dont know how to do this

Account table and signatory table are linked via account# field,

Signatory and members table are linked via members# field

The spreadsheet contains the following data:

R Number, which is in the accounts table,

CIN, which is in the members table,

Original Members number which is in the members table,

New Members number (only stored in spreadsheet),

So I need to find records in my data base that matches the r-number and CIN and checks if "original members" number matches. If it matches, then we update the original members number with the new members number - along with a bunch of other fields.

Code:
assign
    vl-account# = integer(Membersdata[1])
    vl-CIN# = integer(MembersData[2])
    vl-orig-MEMBERS# = string(MembersData[3])
    vl-new-MEMBERS# = string(MembersData[4])
    vl-Members-ActionDt = today
    vl-abc-Request= yes
    vl-Members-Mod-abc = yes
    .           

   for each account no-lock  where account.account# = vl-account#,
        each signatory of account,
        each members of signatory,
    First members exclusive-lock where  members.cin# = vl-CIN#:

        if members.Members# = vl-orig-MEMBERS# then
            assign
                vl-status = "Needs amending".
            update
                members.Members#  = vl-new-MEMBERS#
                members.Members-action-date =  vl-Members-ActionDt
                members.Members-abc-request=  vl-abc-Directive
                members.Members-modify-by-abc = vl-Members-Mod-abc.
                


        if members.Members# <> vl-orig-MEMBERS# then
            assign
                vl-status = "No action needed".

Can you please give me some guidance on how to call those 3 tables so I can check the values in them against my spreadsheet?

Continue reading...
 
Status
Not open for further replies.
Top