如何选择没有对的记录?

问题描述

enter image description here

大家好,我希望你能帮助我,我如何配对相同的记录,但我想选择像 95 这样没有配对的记录。

这是我的代码,我实际上可以在借记卡和贷记卡上配对相同的记录,但我也想显示没有配对的记录。

select 
 A."ShortName" as "BP Code",A."LineMemo" as "Remarks",A."Debit",A."Credit",B."LineMemo" as "Remarks",B."Debit",B."Credit"
from JDT1 A
inner join
(
 select
  "ShortName","LineMemo","Debit","Credit"
from "JDT1" where "TransType" = '18' /*A/P Invoices*/
) B on A."Debit" = B."Credit" and A."ShortName" = B."ShortName"

Where "TransType" = '46' /*Outgoing Payments*/
and A."ShortName" = 'D-0003'
and A."RefDate" between '2020-01-01' and '2020-12-31'

结果:

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)