Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Update
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00210164
Message ID:
00210204
Vues:
32
>>>>In Access, my husband updated the values in one table based on the values in another table by putting a JOIN in the SQL. I figured it would be the same in VFP, but I can't figure out how to do it. I don't remember his exact syntax, so I don't know if I'm doing it wrong, or if VFP doesn't support this.
>>>>
>>>>Basically, I'm trying to do:
>>>>
>>>>UPDATE table1
>>>>SET table1.field1 = table2.field2
>>>>WHERE table1.key = table2.key
>>>>
>>>>So how do I do this?
>>>>
>>>>Thanks,
>>>>
>>>>-Michelle
>>>
>>>VFP doesn't support correlated SQL Updates of which you appear to be trying, however, it will apply the update the first table based on the values for the current record in the second table.
>>
>>
>>Access is better at something than VFP? That's sad...
>>
>>I guess I'll have to go back to my replace with array method.
>>
>>Thanks,
>>
>>-Michelle
>
>Or use a scan on the second (driving table) with the update command inside.


Yeah, that'll work better with the size of these tables.

Thanks,

-Michelle
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform