SELECT
transaction.entityid,
transaction.tranid,
transaction.job, customrecord_recordtype.custrecord_customfield
FROM transaction
LEFT JOIN transaction ON
( transaction.job = customrecord_recordtype.custrecord_customfield)
WHERE transaction.id = '12345'
c
CD
09/15/2021, 8:37 PM
Use table aliases for the 2 instances of
transaction
in the from clause
CD
09/15/2021, 8:38 PM
Or maybe your join is a mistake and you meant to left join on a different table
CD
09/15/2021, 8:40 PM
At first glance I thought you were doing a self-join, but I think you just made a mistake and need to change your join to use LEFT JOIN customrecord_recordtype instead of transaction
x
XochisSketches
09/15/2021, 8:43 PM
Getting better, now it thinks that 'job' (the project number) on the transaction doesn't exist
XochisSketches
09/15/2021, 8:44 PM
SELECT
t.entity,
t.tranid,
c.custrecord_customfield
FROM transaction as t
LEFT JOIN customrecord as c on
( t.job = c.custrecord_custom_project_fld )
WHERE t.id = '6075760'