张小狗儿 2016-07-29 07:28 采纳率: 0%
浏览 2056

SQLSERVER触发器如何DEBUG

用的SQL SERVER2012 VS版本是10 不能调试似乎

  • 写回答

2条回答

  • 张小狗儿 2016-07-29 07:27
    关注

    create trigger trigger_ProductGoods_update
    on t_yms_Products
    after update
    as
    declare @fid varchar(20), @fstandard numeric(19, 2);
    select @fid = fid,@fstandard = fstandard from inserted;
    if
    ((select min(t.fsupplierprice) from t_yms_SupplierProduct t
    left join t_yms_stockComparison t1 on t1.FId = t.FstockComparisonID
    where t1.FproductGoodsID = @fid and t.Fstatus=1 and
    datediff(second,t.FLastUpdateTime,GETDATE())<(select FconfigValue from t_yms_systemconfig where FconfigName='供应商库存有效期')*3600)) <= @fstandard
    begin
    print'开始执行'
    update t_yms_products set Fdiscount = 1 where fid = @fid
    print' 执行更新'
    end

    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!