NJC__Documentation::DB

dbo.vw_ms_manual_grn_group_supplier

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Null on Null Input

False

Schema Bound

False

Assembly

SQL Script

SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO

CREATE FUNCTION dbo.vw_ms_manual_grn_group_supplier  ()
RETURNS TABLE  
AS  
RETURN   
(   
 SELECT        mapping_supplier_customer_id AS supplier_customer_id
 , COUNT(*) AS grn_total,
 sum(case when r_s=0 then 1 else 0 end) as  grn_ready
 FROM            vw_ms_molts_grn
 where         (NOT (mapping_supplier_customer_id = - 1 OR
       mapping_supplier_customer_id IS NULL) ) and used =0
 --AND ms_manual_invoice_type_id=@ms_manual_invoice_type_id
 GROUP BY mapping_supplier_customer_id
);  
 
GO

Depends On

1