General information
Category:
Coding, syntax & commands
Title:
Replaceing a field using another table
Help,
> I'm trying to update of replace a field in a table, using <
> another table. The first table has two key fields in it. <
> The first is client.ss_numb the second is client.Group_code.<
> The second table's key fields are policy.ssnumber the second<
> policy.group_code. As you have guessed the reletionship is<
> between the SSNumber fields. What I'm trying to do is simplly<
> replace the policy.group_code with client.group_code (char). <
> Because the policy somtime has more the ten policy records <
> with the same ssnumber, I need to be able to replace more then<
> policy.group_code record. The Code I have now works only for two <
> updates per passes.<
> My code is as follows: <
> select policy <
> set order to tag ssnumber <
> select distinct ssnumber from policy ;<
> where empty(group_code) ;<
> into array a Missing <
> if type("aMissing[l,l]") = "C" <
> for ix = 1 to alen(aMissing,l)<
> if seek(aMissing[ix,l],"client","ssnumber") <
> lnGroupCode = client.group_code <
> =seek(aMissing[ix,l],"policy","ssnumber");<
> replace group_code with lnGroupCode ; <
>endif<
>endfor<
>endif<
>Help John <
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only