Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to update a table from a cursor.
Message
From
28/03/2008 02:52:05
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
How to update a table from a cursor.
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01306379
Message ID:
01306379
Views:
46
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
Next
Reply
Map
View

Click here to load this message in the networking platform