Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UPDATE instead of REPLACE
Message
De
28/12/2010 03:26:17
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
UPDATE instead of REPLACE
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01493981
Message ID:
01493981
Vues:
119
Dear Sir,

I have following working codes
 select crsalp
 goto top
 do while !eof()
 	scatter memvar
 
 	xyz="crs"+sys(2015)
 	select ;
 		sum(iif(type="P",cr_amount,0))as cr_amount,;
 		sum(iif(type="D",dr_amount,0))as ddr_amount1;
 		where vou_no=m.vou_no;
 		from crsalp;
 		group by vou_no;
 		into cursor xyz readwrite
 
 	wait window alltrim(str(m.vou_no)) at srows()/2,scols()/2 nowait
 
 	select xyz
 	am1=cr_amount-ddr_amount1
 
 	select cr_sum
 	locate for vou_no=M.vou_no
 	if found()
 		replace dr_amount with am1
 	endif
 
 	select crsalp
 	if !eof()
 		skip
 	endif
 
 enddo
 
 messagebox("Done",0+16+256,"Successfully")
I need UPDADTE SQL command against above codes.

Please help


Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform