Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replacing records in table
Message
De
21/07/2000 11:05:11
 
 
À
20/07/2000 18:02:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00395142
Message ID:
00395442
Vues:
11
My code isn't correct. I found out what the problem is. In the scan of cpack it takes the first record replaces all the records in packslip with it then goes to the next record of cpack and replaces all the records in packslip that match the courseid and studentid. So at the end I have the last record of cpack replacing all the records in packslip. Here is my code:

select cpack
scan
quant = iif(inlist(materialid,"VX29","VX39"), qty3, iif(inlist(materialid, "VX57","VX50"),qty2,iif(inlist(materialid, "VX51"),qty,iif(inlist(materialid,"CJ30","CJ31","CJ32","CJ33","CJ34","CJ35","CJ36","CJ37","CJ38","CJ39","CJ40"), "2","1"))))
quant = val(quant)
replace studentid with cpack.studentid, courseid with cpack.courseid,;
materialid with cpack.materialid, descript with cpack.description,;
qty with quant for packslip.studentid == cpack.studentid and packslip.courseid == cpack.courseid in packslip
select packslip
endscan

How do you think I could change this?


Thanks,
Tyler
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform