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:
01202604
Vues:
21
>Thank naomi.
>
>But i have a another probleme because "nstkjour" do'nt accept Null value...
>
>bernhart
>

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?

E.g.
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
>
>>>Thank Sergey.
>>>
>>>I have a another problem with a another sql command.
>>>
>>>
>>> vp_date = DATE()
>>>* I want the stock From yesterday
>>>*-- If not exist in agendaPhar i get the stock from Traiter.dbf
>>>
>>>UPDATE AgendaPhar ;
>>>      SET ;
>>>      NVL( nstkjour = (  SELECT  apcor.nstkjour FROM AgendaPhar apcor ;
>>>      INNER JOIN Traiter Tcor ON Tcor.iid = apcor.itraiterId WHERE apcor.ddate < vp_date ) , 0 )
>>>
>>>
>>>
>>>
>>>
>>>This command give me a error when i try to save the programm.
>>>Invalid use of a visual foxpro function...
>>>
>>>A idea ?
>>>A very big thank for your help.
>>>
>>Bernhart,
>>
>>In update command you can not use NVL for the field you're updating. In other words, it should be
>>
>>Update MyTable Set MyField = ....
>>
>>Move NVL to the proper place in the command.
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform