PlanetJupiter
03/24/2023, 10:23 AMSELECT
id,
startdate,
transactionnumber,
-- assemblyitem,
enddate,
BUILTIN.DF(entity) as Customer,
FROM
Transaction
WHERE
( Type = 'WorkOrd' )
Clay Roper
03/24/2023, 2:47 PMtransactionline
table. You can join on transactionline.transaction = transaction.id
. In this case, you should filter by mainline = 'T'
.
For example:
SELECT
tran.id,
tran.startdate,
tran.transactionnumber,
line.item,
tran.enddate,
BUILTIN.DF(tran.entity) as Customer,
FROM transaction AS tran
JOIN transactionline AS line
ON line.transaction = tran.id
WHERE
tran.type = 'WorkOrd' AND
line.mainline = 'T'
PlanetJupiter
03/28/2023, 10:54 AMClay Roper
03/28/2023, 1:21 PMline.mainline = 'T'
. Feel free to try the query above for yourself to see - you can add AND tran.id = xxx
where xxx
is the internal ID of a Work Order whose assembly item id you know, so you can validate the results.Clay Roper
03/28/2023, 1:21 PM