refactor(blocking query): changes made to only show 1 bo at a atime
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
export const blockQuery = `
|
export const blockQuery = `
|
||||||
SELECT
|
SELECT TOP(1)
|
||||||
'Alert! new blocking order: #' + cast(HumanReadableId as varchar) + ' - ' + ArticleVariantDescription as subject,
|
'Alert! new blocking order: #' + cast(HumanReadableId as varchar) + ' - ' + ArticleVariantDescription as subject,
|
||||||
cast([HumanReadableId] as varchar) as blockingNumber,
|
cast([HumanReadableId] as varchar) as blockingNumber,
|
||||||
[ArticleVariantDescription] as article,
|
[ArticleVariantDescription] as article,
|
||||||
@@ -41,5 +41,6 @@ on [test1_AlplaPROD2.0_Reporting].[reporting_blocking].[BlockingOrder].Producti
|
|||||||
|
|
||||||
where [test1_AlplaPROD2.0_Reporting].[reporting_blocking].[BlockingOrder].[BlockingDate] between getdate() - 1 and getdate() + 1
|
where [test1_AlplaPROD2.0_Reporting].[reporting_blocking].[BlockingOrder].[BlockingDate] between getdate() - 1 and getdate() + 1
|
||||||
and [test1_AlplaPROD2.0_Reporting].[reporting_blocking].[BlockingOrder].BlockingTrigger = 1
|
and [test1_AlplaPROD2.0_Reporting].[reporting_blocking].[BlockingOrder].BlockingTrigger = 1
|
||||||
and HumanReadableId NOT IN ([sentBlockingOrders])
|
--and HumanReadableId NOT IN ([sentBlockingOrders])
|
||||||
|
and HumanReadableId > [lastBlocking]
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user