Описание
(Нет описания для представления GRADEBASISES)
Поля
Поле | Тип | Описание |
---|---|---|
GRADEBASISID |
INTEGER |
|
SWITCHDATE |
DATE |
|
STORAGEID |
INTEGER |
|
STATE |
INTEGER |
|
CROPID |
INTEGER |
|
RECIPEOUTNAME |
VARCHAR(31) |
|
SEMOLINA |
NUMERIC(9,2) |
|
MEALEXTRA |
NUMERIC(9,2) |
|
MEAL1 |
NUMERIC(9,2) |
|
MEAL2 |
NUMERIC(9,2) |
|
MEAL3 |
NUMERIC(9,2) |
|
BRAN |
NUMERIC(9,2) |
|
FLAKES |
NUMERIC(9,2) |
|
WASTE |
NUMERIC(9,2) |
|
WASTEUSELESS |
NUMERIC(9,2) |
|
DRY |
NUMERIC(9,2) |
|
Триггеры
(Нет триггеров для представления GRADEBASISES)
Определение
CREATE VIEW GRADEBASISES(
GRADEBASISID,
SWITCHDATE,
STORAGEID,
STATE,
CROPID,
RECIPEOUTNAME,
SEMOLINA,
MEALEXTRA,
MEAL1,
MEAL2,
MEAL3,
BRAN,
FLAKES,
WASTE,
WASTEUSELESS,
DRY)
AS
select
GRADEBASIS.GRADEBASISID,
GRADEBASIS.SWITCHDATE,
GRADEBASIS.STORAGEID,
GRADEBASIS.STATE,
GRADEBASIS.CROPID,
GRADEBASIS.RECIPEOUTNAME,
Semolina.basisvalue,
MealExtra.basisvalue,
Meal1.basisvalue,
Meal2.basisvalue,
Meal3.basisvalue,
Bran.basisvalue,
flakes.basisvalue,
waste.basisvalue,
wasteuseless.basisvalue,
dry.basisvalue
from GRADEBASIS
left join gradebasisclass Semolina on Semolina.gradebasisid = GRADEBASIS.gradebasisid and Semolina.classid = 44
left join gradebasisclass MealExtra on MealExtra.gradebasisid = GRADEBASIS.gradebasisid and MealExtra.classid = 13
left join gradebasisclass Meal1 on Meal1.gradebasisid = GRADEBASIS.gradebasisid and Meal1.classid = 14
left join gradebasisclass Meal2 on Meal2.gradebasisid = GRADEBASIS.gradebasisid and Meal2.classid = 15
left join gradebasisclass Meal3 on Meal3.gradebasisid = GRADEBASIS.gradebasisid and Meal3.classid = 65
left join gradebasisclass Bran on Bran.gradebasisid = GRADEBASIS.gradebasisid and Bran.classid = 46
left join gradebasisclass flakes on flakes.gradebasisid = GRADEBASIS.gradebasisid and flakes.classid = 47
left join gradebasisclass waste on waste.gradebasisid = GRADEBASIS.gradebasisid and waste.classid = 66
left join gradebasisclass wasteuseless on wasteuseless.gradebasisid = GRADEBASIS.gradebasisid and wasteuseless.classid = 245
left join gradebasisclass dry on dry.gradebasisid = GRADEBASIS.gradebasisid and dry.classid = 246
;