Simplicty and flexibility!


Modifying each record in a table using data from the previous record in the same table


Started by Edward Gordley
Search
You will need to Sign In to be able to add or comment on the forum!

Modifying each record in a table using data from the previous record in the same table

I am trying to copy data from one field in the first record of a table to a field in the second record of the table and to continue that process through all the records in the table. There is no sequential field in the table because I'm clustering the records as are entered to maintain a particular sort pattern. Any ideas on how this can be accomplished.


Written by Edward Gordley 21/02/14 at 21:40:17 DataEase for Windows 7.x

Re:Modifying each record in a table using data from the previous record in the same table

It they are clustered and you simply want to copy a field value from a previous record to the next it is easy:

any DQL with no sorting will process data in saved i.e. clustered order

define "MyValue" text .

define "Counter" number .

for MyForm ;

if counter>0 then
modify records
SecondField := MyValue .

end 
MyValue := FirstField .
Counter := Counter +1 .
end

This DQL will "keep" FirstField value from the previous record and save it  in the following record.


Written by DataEase 22/02/14 at 08:23:14 DataEase for Windows 7.x

Re:Re:Modifying each record in a table using data from the previous record in the same table

Written by Edward Gordley 24/02/14 at 03:19:29 DataEase for Windows 7.x
DG3_ForumList