feat(datamart): migrations completed remaining is the deactivation that will be ran by anylitics
Some checks failed
Build and Push LST Docker Image / docker (push) Failing after 39s
Some checks failed
Build and Push LST Docker Image / docker (push) Failing after 39s
This commit is contained in:
33
backend/prodSql/queries/datamart.openOrders.sql
Normal file
33
backend/prodSql/queries/datamart.openOrders.sql
Normal file
@@ -0,0 +1,33 @@
|
||||
use [test1_AlplaPROD2.0_Read]
|
||||
|
||||
select
|
||||
customerartno
|
||||
,r.ArticleHumanReadableId as article
|
||||
,r.ArticleAlias as articleAlias
|
||||
,ReleaseNumber
|
||||
,h.CustomerOrderNumber as header
|
||||
,l.CustomerLineItemNumber as lineItem
|
||||
,r.CustomerReleaseNumber as releaseNumber
|
||||
,r.LoadingUnits
|
||||
,r.Quantity
|
||||
,r.TradeUnits
|
||||
,h.CustomerHumanReadableId
|
||||
,r.DeliveryAddressDescription
|
||||
,format(r.LoadingDate, 'MM/dd/yyyy HH:mm') as loadingDate
|
||||
,format(r.DeliveryDate, 'MM/dd/yyyy HH:mm') as deliveryDate
|
||||
,r.Remark
|
||||
--,*
|
||||
from [order].[Release] as r (nolock)
|
||||
|
||||
left join
|
||||
[order].LineItem as l (nolock) on
|
||||
l.id = r.LineItemId
|
||||
|
||||
left join
|
||||
[order].Header as h (nolock) on
|
||||
h.id = l.HeaderId
|
||||
|
||||
WHERE releasestate not in (1, 2, 4)
|
||||
AND r.deliverydate between getDate() + -[startDay] and getdate() + [endDay]
|
||||
|
||||
order by r.deliverydate
|
||||
Reference in New Issue
Block a user