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 08:19:48
 
 
To
22/09/2006 08:16:10
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:
01156343
Views:
19
>>>What's the best (simplest <s>) way to replace a value in cursor2 with a value in cursor1 where they match on another value? I could scan and then locate and all that, but I figured there must be something cleaner.
>>
>>
Update cursor2 set field1=cursor1.field1 from cursor1 where cursor1.field2=cursor2.field2
>>
>>Update (no pun intended): Sorry, this will work in VFP9, but not in VFP8. Another good reason to update!
>
>Great! I have a follow-up question...
>
>What if there are more than one possible match between the cursors? The issue is that I'm matching up records from one table to another to create footnotes. There could be multiple footnotes per record. The results should look like this:
>
>
>Fund     Footnote
>A        1
>B        3
>C        1,5
>
>
>I'm having a bit of trouble getting my head around how to do this. Currently the footnote field is numeric, but it could be character.

Before you waste any more time on a dead end, did you read my updated message that the syntax I showed you will only work with VFP9?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform