Christopher Zammit
10/03/2024, 1:48 PMSELECT
t.id,
tn.id,
tn.type,
tn.foreigntotal,
tl.*
FROM
transaction AS t
LEFT JOIN NextTransactionLineLink AS ntll ON ntll.previousdoc = t.id
LEFT JOIN transaction AS tn ON tn.id = ntll.nextdoc
LEFT JOIN transactionLine AS tl ON tl.id = tn.id
WHERE
t.id = '100000'