Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replaceing a field using another table
Message
From
20/04/2000 22:52:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Replaceing a field using another table
Miscellaneous
Thread ID:
00362116
Message ID:
00362116
Views:
47
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
Map
View

Click here to load this message in the networking platform