下载数据提示dbo.POS_FoodCombSelect 中插入重复键

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-23浏览:1

下载数据提示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 中插入重复键

问题描述:下载数据提示dbo.POS_FoodCombSelect 中插入重复键解决方案:门店数据库delete这张表数据,重置下下载任务,再重新下载--脚本不...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息