if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[up_InitData_Cust]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[up_InitData_Cust]
Go

create procedure up_InitData_Cust
With Encryption
as 

delete  from tCustomer where CustCode<>'000'
Update tCustomer Set WTotal=0,THTotal=0,DscTotal=0,PayTotal=0 where CustCode='000'

truncate table CustType

update tCustomer Set TypeCode='' 