From 15860fa29285ce48959f980dd44027f683f28b66 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 17 Dec 2021 08:19:30 +0400 Subject: =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D1=88=D0=B5=D1=81=D1=82=D1=83=D1=8E=20=D0=B8=20=D1=81=D0=B5?= =?UTF-8?q?=D0=B4=D1=8C=D0=BC=D1=83=D1=8E=20=D0=BB=D0=B0=D0=B1=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task6_triggers.sql | 18 ------------------ task7_procedures.sql | 5 ++++- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/task6_triggers.sql b/task6_triggers.sql index 67c79e3..3275880 100644 --- a/task6_triggers.sql +++ b/task6_triggers.sql @@ -63,24 +63,6 @@ GO DELETE FROM Deliveries WHERE driver_id=2 GO --- Add - -INSERT INTO Drivers (city_id, salary, on_delivery) -VALUES (4, 35000, 0); -GO - -INSERT INTO Vehicles (name, tonnage, gas_consumption) -VALUES (N'KAMAZ', 30, 50); -GO - -INSERT INTO Routes (city1_id, city2_id, distance) -VALUES (1, 2, 900); -GO - -INSERT INTO Deliveries (driver_id, vehicle_id, route_id, date) -VALUES (1, 1, 1, '2021-09-08'); -GO - --------------- -- Задание 2 -- --------------- diff --git a/task7_procedures.sql b/task7_procedures.sql index a93dd3f..891db18 100644 --- a/task7_procedures.sql +++ b/task7_procedures.sql @@ -40,8 +40,11 @@ GO DROP PROCEDURE calculate_order_price GO +INSERT INTO Boxes (order_id, warehouse_id, wrapping_id, volume, weight) +VALUES (100020, 1, 1, 0.1, 10); + DECLARE @price INT; -EXEC calculate_order_price 12, @price OUTPUT; +EXEC calculate_order_price 100020, @price OUTPUT; PRINT @price GO -- cgit v1.2.3