Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Update with a SQL Select
Message
 
À
01/09/1998 16:26:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00128511
Message ID:
00132274
Vues:
14
>>Has anyone gotten anything like this to work in VFP?
>>If so, could you share some examples? Or any examples of Update/Select working together.
>>
>>UDPATE t1
>> SET rate = rate + (SELECT increase FROM t2 WHERE id = t1.id)
>>
>Steve, 9-01-98
>This is easy as pie in Fox.
>
>use t2 order tag id
>select 0
>use t1 && in any order
>set relat to id into t2
>browse fields id,rate,t2.id,t2.increase && look before you leap
>replace all rate with rate+t2.increase && perform the update
>
>I've used SQL, too, and it makes everything harder than in Fox.
>Good Luck,
>Gary Nemeth

Except we're not using any set relations....yup, it works but we
have to code to Oracle & SQL-Server back ends so the code above
is out. Thanks though.

Steve
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform