SaveText.Ru

Без имени
  1. DELETE FROM TDOCUMCONTENT DC WHERE EXISTS (SELECT DT.FID FROM TDOCUMTITLES DT WHERE DC.FDOCID = DT.FID AND DT.FSTATE IN (0,1)) AND ( EXISTS (SELECT S.FID FROM TSTORE S WHERE DC.FSTOREID = S.FID AND S.FGOODSID = 984));
  2. UPDATE TSTORE SET FAMOUNT = 0, FRESERV = 0 WHERE FID = 1241;
  3. UPDATE TGOODS SET FAMOUNT = 1, FRESERV = 0 WHERE FID = 984;
  4. ALTER TABLE TSTORE ADD CONSTRAINT CHK4_TSTORE CHECK (FRESERV >=0);
  5. ALTER TABLE TGOODS ADD CONSTRAINT CHK4_TGOODS CHECK (FRESERV >= 0);

Share with your friends:

Print