Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace a field in a table using a master table
Message
De
20/04/2000 11:44:57
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
20/04/2000 11:33:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00361486
Message ID:
00361826
Vues:
17
>Thanks
>>I have to tables one Client, the other policy. I didn't have a group code<
>> field in the table, because it was inported via a text file. I have the group<
>> code present in the client table. Because the policy database has a ssnumber<
>> Tag field, and the Client table also has a ssnumber tag it forms the relation<
>> Because there may be more then one policy assigned to a ssnumber in the< >policy table , I need to pass the group code with each each ssnumber in the< >policy database from the client.<
>
>>I need to place a group code in all of the policy records from the client<
>> table <


Let's try another one :)
select policy
set order to tag ssnumber
select distinct ssnumber from policy ;
  where empty(group_code) ;
  into array aMissing

if type("aMissing[1,1]") = "N" && Assuming they're numeric
                               && _tally > 0 could be too
 for ix = 1 to alen(aMissing,1)
    if seek(aMissing[ix,1],"client","ssnumber")
       lnGroupCode = client.group_code
       =seek(aMissing[ix,1],"policy","ssnumber")
       replace group_code with lnGroupCode ;
              while ssnumber = aMissing[ix,1]
    endif
 endfor
endif
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform