openedge - How to check the availablility of a Progress database record with the values stored in a .csv file as input? -
i uploading csv file of records check if these records available in specific progress database table.
how proceed?
assuming lot of things here since you're not specifying much.
assuming have file containing animal id's, 1 per row:
file.csv ========= 1 2 3
assuming have database table called animals
fields id
, animalname
can (a naive approach - assuming input data formatted, no error checking etc):
/* define temp-table store file data in*/ define temp-table ttanimal no-undo field id integer. /* input files */ input value("c:\temp\file.csv"). repeat: /* assumption: data clean , formatted! */ create ttanimal. import ttanimal. end. input close. /* each animal id read file. locate database record , display name */ each ttanimal: find first animal no-lock animal.id = ttanimal.id no-error. if available animal do: disp animal.animalname. end. end.
Comments
Post a Comment