Information générale
Catégorie:
Codage, syntaxe et commandes
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement