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 08:19:48
 
 
À
22/09/2006 08:16:10
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:
01156343
Vues:
21
>>>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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform