[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: For Each with Where and Break By

Status
Not open for further replies.
P

Patrice Perrot

Guest
Hi Adding an index will solve the isuse in most of case . But if the record is in the "packet" received it will not work , You can try the code below there is only 3 record in the Temp-Table instead of 4 and the update is on record "3" . def temp-table tt-test field id as int field customer as int field added as char. create tt-test. assign tt-test.id = 1 tt-test.customer = 100 tt-test.added = "". create tt-test. assign tt-test.id = 2 tt-test.customer = 100 tt-test.added = "". create tt-test. assign tt-test.id = 3 tt-test.customer = 100 tt-test.added = "". /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* create tt-test. assign tt-test.id = 4 tt-test.customer = 100 tt-test.added = "". *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ def buffer b-tt-test for tt-test. for each tt-test where tt-test.added <> "S" break by tt-test.customer: if tt-test.id = 2 then for first b-tt-test where b-tt-test.id = 3: assign b-tt-test.added = "S". end. disp tt-test.id tt-test.added last-of(tt-test.customer). end. Patrice

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