More Useful SQL statments for Visual Enterprise from Infor

Here are some of my raw notes:


SELECT CUSTOMER_ID, ID, CUSTOMER_PO_REF
FROM CUSTOMER_ORDER
WHERE (ID = '200150960')

select CUST_ORDER_ID from CUST_ORDER_LINE where CUST_ORDER_ID='200150960'

SELECT QUOTE_ID FROM QUOTE_ORDER WHERE CUST_ORDER_ID = '200150960'

Use SFC to get the Work Order Number:
------------------------------------------

SELECT SUPPLY_BASE_ID, DEMAND_BASE_ID
FROM DEMAND_SUPPLY_LINK
WHERE (DEMAND_BASE_ID = '200150960')


Now find the Operation Status
---------------------------------
SELECT OPERATION_SEQ_NO, RESOURCE_ID
FROM LABOR_TICKET
WHERE WORKORDER_TYPE = 'W' AND WORKORDER_BASE_ID = '746952' AND WORKORDER_LOT_ID = '1'

What is the work order Status, and ship date if it's already gone?
----------------------------------------------
SELECT STATUS, close_date
FROM WORK_ORDER
WHERE BASE_ID = '789635'


Combine WO and Status
------------------------
SELECT DEMAND_SUPPLY_LINK.DEMAND_BASE_ID AS [Customer Order], DEMAND_SUPPLY_LINK.SUPPLY_BASE_ID AS [Work Order],
WORK_ORDER.STATUS AS [WO Status], WORK_ORDER.CLOSE_DATE AS [Close Date]
FROM WORK_ORDER INNER JOIN
DEMAND_SUPPLY_LINK ON WORK_ORDER.BASE_ID = DEMAND_SUPPLY_LINK.SUPPLY_BASE_ID
WHERE DEMAND_SUPPLY_LINK.DEMAND_BASE_ID = '200150960'



Find the complete list of operations
--------------------------------------
SELECT SEQUENCE_NO, RESOURCE_ID
FROM OPERATION
WHERE (WORKORDER_BASE_ID = '790939')
ORDER BY SEQUENCE_NO

Find just the completed operations by seqence number
-----------------------------------------------------
SELECT OPERATION_SEQ_NO
FROM LABOR_TICKET
WHERE WORKORDER_TYPE = 'W' AND WORKORDER_BASE_ID = '790939' AND WORKORDER_LOT_ID = '1'

Comments

Popular Posts