If you run it for one period, then anything dated before or after that month is in the wrong period. You can turn on a system alert to email you when users post to the wrong period. You can also turn on the new feature called "change posting period based on transaction date". That automates most of the posting for you except in payroll posting and AP check posting because the period is selected before you enter the check date. Those would be helpful to eliminate the issue.
I realize I'm not answering your SQL query question, but in your screenshot you didn't include what table you started the report from.
Dude, Neil! You are the man, thank you so much for clarifying my syntax troubles for me... I have no idea why they insisted on making this small change from standard T-SQL syntax and refused to document it, but it worked out.
I had to rethink my query since lgrsub is not the table I actually wanted - it was actpay. This is the query that ended up being a home run:
[SELECT actpay.vndnme from actpay, lgtnln, actpay inner join lgtnln on lgtnln.subact = actpay.recnum where lgtnln.recnum = {lgtnln.recnum} and lgtnln.subact = {lgtnln.subact}]
Thanks again Neil!
Thank you for your ideas - I really appreciate it. You would be surprised on how often there are correct postings in a different period than the transaction date in the construction industry... at least that's what I have gathered from my limited accounting knowledge as an IT guy, ha
Also, you can tell I started the report from Ledger Transaction Lines in that screenshot just fyi