ALTER TRIGGER [dbo].[PriceRange] ON[dbo].[Tab_SaleAndCarStyle] for update,insert,delete AS declare @Saleshop int,@minDfJjSale decimal(18,3),@maxDfJjSale decimal(18,3),@isDfjj varchar(50) set @isDfjj='否' if exists(select 1 from inserted) B
alter trigger [dbo].[pricerange]
on [dbo].[tab_saleandcarstyle]
for update,insert,delete
as
declare @saleshop int,@mindfjjsale decimal(18,3),@maxdfjjsale decimal(18,3),@isdfjj varchar(50)
set @isdfjj='否'
if exists(select 1 from inserted)
BEGIN
select @SaleShop=SaleShop from inserted
select @minDfJjSale=min(DfJjSale),@maxDfJjSale=max(DfJjSale) from Tab_SaleAndCarStyle where Saleshop=@Saleshop and state>0 and price_ver=1 group by SaleShop
if(@minDfJjSale=0 and @maxDfJjSale=0)
set @isDfjj='否'
else
set @isDfjj='是'
update dbo.TAB_PARTNER
set PriceRange=ltrim(@minDfJjSale)+'~'+ltrim(@maxDfJjSale),ispartneraddprice=@isDfjj
where ID= @saleshop
END
else
if exists (select 1 from deleted)
BEGIN
select @SaleShop=SaleShop from deleted
select @minDfJjSale=min(DfJjSale),@maxDfJjSale=max(DfJjSale) from Tab_SaleAndCarStyle where Saleshop=@Saleshop and state>0 and price_ver=1 group by SaleShop
if(@minDfJjSale=0 and @maxDfJjSale=0)
set @isDfjj='否'
else
set @isDfjj='是'
update dbo.TAB_PARTNER
set PriceRange=ltrim(@minDfJjSale)+'~'+ltrim(@maxDfJjSale),ispartneraddprice=@isDfjj
where ID= @saleshop
END
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号