sql Identificar Produtos PriceChange Que Geraram Tarefas
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql Identificar Produtos PriceChange Que Geraram Tarefas相关的知识,希望对你有一定的参考价值。
select ipc.ItemId, ipc.IntegrationDate, ipc.RetailStoreId, ac.Description, a.Name, a.CreateDate, t.Description, t.CreateDate
from stra.ItemPriceChange ipc
inner join ra.item i on i.ItemId = ipc.ItemId
inner join tm.LocationItem li on li.RetailStoreId = ipc.RetailStoreId
inner join tm.LocationList ll on ll.LocationListId = li.LocationListId
inner join tm.AlertConfig ac on ac.LocationListId = ll.LocationListId
left join tm.Alert a on a.AlertConfigurationId = ac.AlertConfigId
left join tm.Task t on t.AlertId = a.AlertId
where ipc.RetailStoreId = 'S2124' and ipc.IntegrationDate between '2017-05-11 00:00:00' and '2017-05-11 07:30:00' and
i.HierarchicalStructureId IN
(
SELECT HierarchicalStructureId FROM ra.HierarchicalStructurePath WHERE HierarchicalAncestorId IN (
SELECT HierarchicalStructureId FROM ra.BusinessStructureItem WHERE BusinessStructureListId=ac.BusinessStrucutureId)
)
and a.CreateDate > '2017-05-11 00:00:00'
and t.CreateDate > '2017-05-11 00:00:00'
以上是关于sql Identificar Produtos PriceChange Que Geraram Tarefas的主要内容,如果未能解决你的问题,请参考以下文章