[Stackoverflow] [Progress OpenEdge ABL] ABL Progress OpenEdge: Updating records in csv file with delimiter

  • Thread starter Thread starter Amber p
  • Start date Start date
Status
Not open for further replies.
A

Amber p

Guest
I'm working on the very first steps to be able te refresh a database environment.

First I export a table from environment 1 to a csv file called Test1.

Code:
OUTPUT TO VALUE("X:\Test\Test1.csv").

FOR EACH Test1 NO-LOCK:
    EXPORT DELIMITER ',' Test1.      
END.

OUTPUT CLOSE

then I import this file to environment 2 where it is unkown if all records in test1 are existing in environment 2. also unkown if the order is the same (this is where the below is limited in functioning)

Code:
INPUT FROM "X:\Test\Test1.csv".

FOR EACH Test12:
    IMPORT DELIMITER ',' Test1.
END.

So I need to be able to see if the existing records in environment 2 are present in the exported file Test1 from environment 1 and apply changes/updates by adjust these records in environment 2.

Unfortunately I cannot go more specific with names and date since it is confidential

I tried with the shown scripts to edit the exportfile Test1 in notepadd++ by removing a record which still worked well. howver, when i also removed the blank rule i left behind by removing the record, so everything moved one row upwards, it mentions that the entryID (first column) already exists. this means it exists in the file on another row ( which was the row below before i removed a record.).

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