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:
01241301
Views:
32
Hi Bernhart,

I'm not sure if you got it to work or need more help :)

>
>it 's Ok ! Thank
>
>1) I am constrained to make you work! ..:)
>
>2) I see my probleme
>V_AgendaPhar is a view for a precies day. ( whereClaus = iagendadateid = Vp_datePrecies )
>The code is dus a little different.
>
>
>UPDATE ap   ;
>  SET nstkjour = pd.nStkjourCor ;
>  FROM  V_AgendaPhar ap ;
>  JOIN(;
>  SELECT apd.nstkjour AS nStkjourCor, ;
>  apd.itraiterId , apd.iagendadateid ;
>  FROM  AgendaPhar apd ;
>  WHERE apd.iagendadateid < lnVp_Id ;
>  AND NOT EXISTS ( SELECT * FROM AgendaPhar  ;
>  WHERE itraiterId = apd.itraiterId ;
>  AND iagendadateid < lnVp_Id ;
>  AND iagendadateid > apd.iagendadateid)) pd ;
>  ON ap.itraiterId = pd.itraiterId ;
>  WHERE ap.iagendadateid = lnVp_Id
>
>
>3) For the first day , there is no previous days with stock.
>
>
> SET nstkjour = NVL( pd.nStkjourCor , V_AgendaPhar.nstkjour )  ?????????
>
>
>
>
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform