Canalblog
Suivre ce blog Administration + Créer mon blog
Publicité
4line's code
projetsql
23 avril 2009

tests

CREATE OR REPLACE PROCEDURE AddOrder (PIdclient IN oorder.IdClient%type, POrderDate IN oorder.OrderDate%type) IS BEGIN INSERT INTO oorder (IdO, IdClient, OrderDate, OrderState) VALUES (Seq_oorder.nextval, PIdclient, POrderDate, 'AT') ; END;/ EXECUTE AddOrder(1,...
Publicité
21 avril 2009

tache 3

REM 1) passer les commandes AT en ECT après 24 H CREATE OR REPLACE PROCEDURE passerATenECT IS CURSOR mon_curseur IS SELECT IdO FROM oorder WHERE OrderState = 'AT' AND floor(((sysdate-OrderDate)*24*60*60)/3600) > 24; AT_ECT mon_curseur%ROWTYPE; BEGIN OPEN...
21 avril 2009

tache 4

CREATE OR REPLACE VIEW LongWaitASSELECT IdO, IdClient, OrderDate, OrderState, OrderDateECT, DENSE_RANK() OVER(ORDER BY OrderDateECT) AS RangFROM OorderWHERE OrderState = 'ECT';/ select * from LongWait;
20 mars 2009

tache2

CREATE OR REPLACE PACKAGE APIOrder IS PROCEDURE AddOrder (PIdclient IN oorder.IdClient%type, POrderDate IN oorder.OrderDate%type); PROCEDURE AddOrderLine (PIdO IN orderline.IdO%type, PIdProduct IN orderline.IdProduct%type, PQuantity IN orderline.Quantity%type);...
20 mars 2009

tache1

REM PRODUCT (IdProd, ProdName, StockQuantity, PurchasePrice, #IdTheme)REM CLIENT (IdClient, CliName, Adresse, PostalCode, Town)REM THEME (IdTheme, ThemeName)REM OORDER (IdO, #IdClient, OrderDate, OrderState)REM ORDERLINE (IdOL, #IdO, #IdProduct, Quantity)...
Publicité
Publicité
Publicité