Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update syntaxe for a stock programmation.
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01228160
Message ID:
01228214
Views:
27
Sergey,

ok i understood.
A big thank for help.


Good afternoon

bernhart

>You have to use LEFT JOIN in order to upadte all records in the v_AgendaPhar. With INNER JOIN the records in v_AgendaPhar that don't have matching records in derived table pd will not be updated.
>
>  UPDATE v_AgendaPhar  ;
>      SET nstkjour = NVL( pd.nStkjourCor , 0 ) +1 ;
>    FROM v_AgendaPhar;
>      LEFT JOIN(;
>        SELECT apd.nstkjour AS nStkjourCor , apd.itraiterId ;
>          FROM  AgendaPhar apd ;
>          WHERE apd.iagendadateid < vp_id ) pd ;
>    ON v_AgendaPhar.itraiterId = pd.itraiterId
>
>
>
>>
>>I have many problems to know the stock of previous days.
>>I want for the day ( iagendadateid = 2 ) the stock of ( iagendadateid = 1 ) + 1
>>
><snip>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform