sql 24_7SaaS_ReprocessarRemarcaçãoAuditPreço

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql 24_7SaaS_ReprocessarRemarcaçãoAuditPreço相关的知识,希望对你有一定的参考价值。

declare @retailstoreid varchar(18),
		@taskId numeric(10,0);

set @retailstoreid = 'S1351';
select @taskid = min(taskid) from tm.task where actionid = 14 and AlertConfigId is not null and PriceChangeDate > getdate() - 1;

update stra.ItemPriceChange 
   set integrationstatus = 'A' , priceauditintegrationstatus = 'A'
 where pricechangedate > getdate() -1 
   and retailstoreid = @retailstoreid
   and itemid not in (select distinct itemid 
                        from tm.taskitem
					   where taskid >= @taskId 
					     and retailstoreid = @retailstoreid);

select RetailStoreId , ' - ', COUNT(1) from stra.ItemPriceChange  where integrationstatus = 'P' and pricechangedate > getdate() -1 group by RetailStoreId

select  count(1) from stra.ItemPriceChange where integrationstatus = 'A' and pricechangedate > getdate() -1


exec [dbo].[PriceChangeIntegrationProcess]
exec [dbo].[PriceAuditIntegrationProcess]

以上是关于sql 24_7SaaS_ReprocessarRemarcaçãoAuditPreço的主要内容,如果未能解决你的问题,请参考以下文章

SQL*Loader数据装载工具入门_超越OCP精通Oracle视频课程培训24

在SQL查询中获取排序位置

SQL 2012 R2单用户更改多用户

DB2 SQL 在对行进行分组时获取不同的值

如何按 id 对数据进行分组并使用 SQL 获取中值?

如何从 SQL 查询中获取表名?