【问】在前台销售商品单独打折,结算时报错“不能在对象t_rm_protion_flow中插入重复键”。 | ||
【适用版本】专卖店8 | 【模块】零售管理 | 【点击数】34 |
【知识编号】Z2013060800024 | ||
【问题描述】违反了 PRIMARY KEY 约束 ‘pk_t_rm_protion_flow’。不能在对象 ‘t_rm_protion_flow’ 中插入重复键。No changes made to database.INSERT INTO t_rm_protion_flow ( flow_no, pro_id, branch_no, item_no, sale_qty, source_price, sale_price, send_money, special_type, sheet_no, pro_des, give_type, vip_flag, dec_rate, card_id, card_no, oper_id, oper_date, com_flag ) VALUES ( ”, 1, ‘000001’, ‘Q1066’, 1.00, 92.0000, 82.8000, 9.2000, ‘pd’, ”, ‘单品折扣,价格从[92.00]更改为[82.80]’, ‘0’, ‘0’, 0.00, ”, ”, ‘1001’, ‘2013-3-26 9:32:53.875’, ‘0’ ) |
go
declare @tablename varchar(100)
declare test_cur cursor for
select object_name(id) from syscolumns
where status=128
open test_cur
fetch test_cur into @tablename
while @@fetch_status=0
begin
DBCC CHECKIDENT (@tablename, RESEED)
fetch test_cur into @tablename
end
close test_cur