Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace in one cursor for match in another
Message
De
22/09/2006 10:56:13
 
 
À
22/09/2006 10:44:57
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
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 8 SP1
Divers
Thread ID:
01156327
Message ID:
01156466
Vues:
23
No offense, but way too much code for a simple job. Mike Yearwood showed you one solution, I prefer this variant
select targettable
set order to targettag in sourcetable
SET RELATION TO sourceexpression into sourcetable
REPLACE all field1 with sourcetable.field1 for !eof('sourcetable')
>I ended up doing this which works fine, but I really would have like to use the UPDATE. Some day...
>
>
>
>SELECT iAccts
>SCAN
>	SELECT crsFundAcctDisc
>	LOCATE FOR crsFundAcctDisc.Acct_ID == iAccts.Acct_ID
>	DO WHILE .T.
>		IF FOUND()
>			REPLACE iAccts.FootNote WITH ALLTRIM(iAccts.FootNote) + '('+ ALLTRIM(STR(crsFundAcctDisc.FootNote))+')'
>			CONTINUE
>		ELSE
>			EXIT
>		ENDIF
>	ENDDO
>	SELECT iAccts
>ENDSCAN
>
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform