Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement