Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to update a table from a cursor.
Message
De
28/03/2008 03:30:33
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Divers
Thread ID:
01306379
Message ID:
01306380
Vues:
7
In your sample you don't have any reference to the from table. You must add soemthing like "where exaMtraN.fieldx=mountt.fieldy"

>how to update a table from a cursor.
>I try but ony smae value updating in each record
>
>Select scode,Descr,lcode,Sec,code_a,name,weight,Examcode,;
>	(Cast(Sum(obt01) As I)) /Count(code_a)  As CW,;
>	(Cast(Sum(obt02) As I)) /Count(code_a)  As HW,;
>	(Cast(Sum(obt03) As I)) /Count(code_a)  As Calli,;
>	(Cast(Sum(obt04) As I)) /Count(code_a)  As Clean,;
>	(Cast(Sum(obt05) As I)) /Count(code_a)  As Presence;
>	WHERE year=kpsYEar AND nmonth<9;
>	FROM awardlist ;
>	GROUP By lcode,Sec,code_a;
>	order By lcode,sec ;
>	INTO table moontt
>	
>	
>	
>	UPDATE exAMtraN SET obt01 = cw,  obt02 = hw, obt03 = calli, obt04 = clean;
>             WHERE yeaR = KPSYEAR AND examtran.examcode="Annual 07-08" from moontt
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform