--V1.8.2所作升级
if exists( Select OptValue from tSysOpt where OptName='DBEdition')
begin
  Declare @DBVer varchar(10)
  Select @DBVer=OptValue from tSysOpt where OptName='DBEdition'
  Set @DBVer=Substring(@DBVer,1,4)+'-'+Substring(@DBVer,6,2)+'-'+Substring(@DBVer,9,2)
  if @DBVer>='2007-12-28'
    Return
end

--修改散客
if not Exists(Select * from tCustomer where CustCode='000')
begin
	Insert into TCustomer(CustCode,CustName,CustShort,CustEName,IsNoUse,Luru,LuruDate,EUser,EDate,AllowDelay,IsChecked)
	Values ('000','散客','散客','SK','0','超级用户',Convert( Varchar(10),GetDate() ,126),'超级用户',Convert( Varchar(10),GetDate() ,126),'0',1)
end else 
	Update tCustomer Set IsChecked=1 where CustCode='000'