下载数据提示dbo.POS_FoodCombSelect 中插入重复键
问题描述:
下载数据提示dbo.POS_FoodCombSelect 中插入重复键
解决方案:
门店数据库delete这张表数据,重置下下载任务,再重新下载
--脚本不用执行
select * from
(
select FoodID,MutexID from
(SELECT MAX(A.FENTRYID) FENTRYID, A.FoodID ,A.MUTEXGROUP MutexID ,A.SELECTQTY ,HA.FUSEORGID FShopID ,HA.FMODIFYDATE ,1 FSwitchFlag FROM POS_FoodCombine A INNER JOIN POS_FoodDEF HA on HA.FoodID=A.FoodID
WHERE A.FoodID IN( SELECT A.FoodID FROM POS_FoodCombine A
INNER JOIN POS_FoodDEF HA on HA.FoodID=A.FoodID and ha.FDOCUMENTSTATUS='C' and HA.FFORBIDSTATUS='A'
WHERE A.FRowVersion > 0 AND HA.FUSEORGID =244763 ) AND HA.FUSEORGID =244763 GROUP BY A.FoodID ,A.MUTEXGROUP, A.SELECTQTY,HA.FUSEORGID, HA.FMODIFYDATE )T group by FoodID,MutexID having(COUNT(1))>1)T
inner join
POS_FOODDEF_L t1 on t.FOODID=t1.FOODID
下载数据提示dbo.POS_FoodCombSelect 中插入重复键
本文2024-09-23 04:23:41发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-165022.html