Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I seriouly NEED help with this, PLEASE LOOK AT THIS...
Message
 
To
11/06/1999 13:43:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00228883
Message ID:
00228899
Views:
11
Sorry Todd, that last message was directed at Chuck.

Joe

>I would solve it by setting a relation between the two tables, SCANning the workpo table and then using an IF statement to test the values of the fields...
>
>select workpo
>scan
>IF workpo.FIELD1 = histpo.field1 then
> * ok, its a match
>else
> * mark the sucker
>endif
>endscan
>
>>ok, I need help with this and here we go...
>>
>>There is one DBC and four DBF within the DBC:
>>
>>PO.dbc
>>
>>POENCR.dbf (this is just for importing from XLS file and delete the first row and PACK it and then APPEND to the WORKPO table)
>>
>>WORKPO.dbf ("working" table)
>>
>>HISTPO.dbf ("history" table, yes, it just keeps growing, it will hold one Fiscal Year worth)
>>
>>DELEPO.dbf ("deleted" table, just for in case we need to look back)
>>
>>OK, the thing is the indexed and main key field is the PO field and there can be duplicated (PO means Purchase Order # and there can be splits, so it can duplicates)!
>>
>>The XLS data imports to POENCR table, delete the top title row, PACK it. Then the WORKPO APPEND from POENCR. While the data being converted and other things added, it then have to compair with HISTPO table.
>>
>>WORKPO vs HISTPO
>>
>>I need to program something that if there is same PO, I need to verify if the other fields are the same or there is a change in one/some of the field(s)...:
>>
>>**If there is any count of PO in WORKPO and none PO in HISTPO, I add the new PO into the HISTPO. I give that record(s) "1" for report. This will be the most route thing more than all others in below.
>>
>>**If there is one PO in WORKPO and one PO in HISTPO and all fields both match, I ignore this record. I give that record "2" in the WORKPO for report.
>>
>>**If there is one PO in WORKPO and one PO in HISTPO and the fields both don't match, I need to remove that one PO record from the HISTPO and append the one record in the DELEPO and update the new one PO from WORKPO to HISTPO. I give "3" in the WORKPO for report.
>>
>>**If there is three PO in WORKPO and two PO in HISTPO, I need to remove those two PO records from the HISTPO and append the 2 records in the DELEPO and update the new three PO from WORKPO to HISTPO. It goes the same for if there is one PO in WORKPO and four PO in HISTPO, I must always update the latest. I give record "3" in the WORKPO for report.
>>
>>THIS IS WHERE I NEED HELP!!!!!!!!!!!!!!!
>>**If there is three PO in WORKPO and three PO in HISTPO, I need to check if the fields matches side by side. This is the part I need advise on. Should I use multi-field into one index tag or how to "mark" the record once if there is a match, so I don't use that same record to match the next record set of the same PO. Are you following?
>>
>>BTW, I got the CodeMine 6.1 but I will look into this after I finish this assignment.
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform