NJC__Documentation::DB

dbo.vw_part_list_change_part_detail_sum_supply

Description

Properties

Name Value
Collation
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Schema Bound

False

Created 11/6/2020 19:05:12
Last Modified 11/6/2020 19:05:12

Columns

Key Name Description
ms_part_list_process_detail_id
quantity_new_part
quantity_recycle
quantity_scrap
total_supply

SQL Script

SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO







CREATE VIEW dbo.vw_part_list_change_part_detail_sum_supply
AS
SELECT        
ms_part_list_process_detail_id
, ISNULL(SUM(quantity_new_part), 0) AS quantity_new_part
, ISNULL(SUM(quantity_recycle), 0) AS quantity_recycle
, ISNULL(SUM(quantity_scrap), 0) AS quantity_scrap
, ISNULL(SUM(quantity), 0) AS total_supply
FROM  dbo.dt_ms_part_list_out 
WHERE (ms_process_id = -2) OR (ms_process_id = 2)
GROUP BY ms_part_list_process_detail_id







GO