Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace in one cursor for match in another
Message
From
22/09/2006 10:56:13
 
 
To
22/09/2006 10:44:57
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01156327
Message ID:
01156466
Views:
21
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
>
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform