Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update Sql Command
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01202518
Message ID:
01202612
Vues:
14
Bernhart,

These two commands can be easily combined into one, I was just trying to understand what do you want that's why I divided the task into 2 steps.
update AgendaPhar set set nStkJour = upd.nStkJour ;
from AgendaPhar inner join (SELECT  nvl(apcor.nstkjour,tcor.nStkJour) as nStkJour, apCor.nID ;
FROM AgendaPhar apcor ;
     INNER JOIN Traiter Tcor ON Tcor.iid = apcor.itraiterId ;
WHERE apcor.ddate < vp_dateupd) upd on AgendaPhar.nID = upd.nID
>>
>>I'm not sure what exactly do you want to do. Do you want to update all nStkJour field with the value from the previous date?
>
>Yes , you understood with my poor english ...:)
>
>>SELECT nvl(apcor.nstkjour,tcor.nStkJour) as nStkJour, apCor.nID ;
>>FROM AgendaPhar apcor ;
>> INNER JOIN Traiter Tcor ON Tcor.iid = apcor.itraiterId ;
>>WHERE apcor.ddate < vp_date into cursor curChanges
>>
>>update AgendaPhar set nStkJour =curChanges.nStkJour ;
>>from AgendaPhar inner join curChanges on ;
>>AgendaPhar.nID = curChanges.nID
>
>
>Ok naomi , that good !
>2 Commands are necessary ?
>
>A big thank...
>
>
>bernhart
>
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform