feat(dm): standard forecast and orders in
This commit is contained in:
@@ -1,8 +1,25 @@
|
||||
export const orderState = `
|
||||
SELECT top(500)
|
||||
SELECT top(10000)
|
||||
CustomerOrderNumber
|
||||
, OrderState
|
||||
, r.ReleaseState
|
||||
, h.CreatedByEdi
|
||||
|
||||
--, *
|
||||
FROM [test1_AlplaPROD2.0_Read].[order].[Header] (nolock)
|
||||
where OrderState = 0
|
||||
FROM [test1_AlplaPROD2.0_Read].[order].[Header] (nolock) h
|
||||
|
||||
/* get the line items to link to the headers */
|
||||
left join
|
||||
[test1_AlplaPROD2.0_Read].[order].[LineItem] (nolock) l on
|
||||
l.HeaderId = h.id
|
||||
|
||||
/* get the releases to link to the headers */
|
||||
left join
|
||||
[test1_AlplaPROD2.0_Read].[order].[Release] (nolock) r on
|
||||
r.LineItemId = l.id
|
||||
|
||||
where
|
||||
--h.CreatedByEdi = 1
|
||||
r.ReleaseState > 0
|
||||
--and CustomerOrderNumber in ( '2365862', '2360391')
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user