Sorry but I do not understand what you're trying to do.
>
>UPDATE V_AgendaPhar ;
> SET nstkjour = NVL( pd.nStkjourCor , 0 ) ;
> FROM V_AgendaPhar ;
> LEFT JOIN(;
> SELECT apd.nstkjour AS nStkjourCor , apd.itraiterId , apd.iagendadateid;
> FROM AgendaPhar apd ;
> WHERE apd.iagendadateid < THISFORM.Vp_Id ;
> AND NOT EXISTS ( SELECT * FROM V_AgendaPhar ;
> WHERE itraiterId = apd.itraiterId ;
> AND V_AgendaPhar.iagendadateid < THISFORM.Vp_Id ;
> AND V_AgendaPhar.iagendadateid > apd.iagendadateid)) pd ;
> ON V_AgendaPhar.itraiterId = pd.itraiterId
>
>
>
>THISFORM.Vp_Id = 12
> V_AgendaPhar is a view with Table Buffer
>( Same structure that tempa.dbf )
>
>
>
>
>
>>Can you post the code ?
>>
>>>
>>>I have still a problem sergey.
>>>
>>>Here is a sample table and a picture
>>>
>>>Tempa.dbf
>>>
http://cjoint.com/data/hrsUUf1jES.htm>>>
>>>UT4 picture
>>>
http://cjoint.com/data/hrsQZe7Byw.htm>>>
>>>I want change nstkjour ( For the same itraiterId ) for igendadateid = 12 with the Value
>>>of nstkjour - nconsjour For iagendadateid < 12.
>>>
>>>Here im my picture = 49 - 1 = 48 But my code do'nt function any more.
>>>
>>>Please Sergey help me.
>>>
--sb--