Hi, currently I'm trying to link the GeneralJournalAccountEntry table with LedgerJournalTrans table. I have SQL script as below to link this two:
select GENERALJOURNALENTRY.RECID, *
from GENERALJOURNALENTRY
inner join GENERALJOURNALACCOUNTENTRY
on GENERALJOURNALENTRY.RECID = GENERALJOURNALACCOUNTENTRY.GENERALJOURNALENTRY
inner join SUBLEDGERVOUCHERGENERALJOURNALENTRY
on SUBLEDGERVOUCHERGENERALJOURNALENTRY.GENERALJOURNALENTRY = GENERALJOURNALENTRY.RECID
left join LEDGERJOURNALTRANS
on LEDGERJOURNALTRANS.VOUCHER = GENERALJOURNALENTRY.SUBLEDGERVOUCHER
Now I'm just using voucher as their key to link but It seems like I need another key to make them more unique and specific since my expected result is they're going to have one to one relationship. Is it possible? Is there anyone here who could help me or give me some ideas on this issue?
Your help greatly appreciated. Thanks!
*This post is locked for comments