經過開戶銀行帳號查詢客商名稱 sql

select * from bd_cubasdoc where pk_cubasdoc in (
select  pk_cubasdoc from bd_custbank where account='37101986106051026069')

查詢空客商客戶銀行的單位名稱spa

select b.custcode,b.custname, d.bankacc,d.bankname,d.unitname,d.ts from bd_accbank d, bd_cubasdoc b,bd_custbank a

where b.pk_cubasdoc=a.pk_cubasdoc
and d.pk_accbank=a.pk_accbank
and d.unitname is null

91行。3d

select d.bankacc,d.bankname,d.unitname,d.ts from bd_accbank d where unitname is nullcode

136行。blog

查詢客商名稱和單位名稱不同的it

select b.custcode,b.custname,b.ts,d.unitname,d.ts --, d.bankacc,d.bankname
from bd_accbank d, bd_cubasdoc b,bd_custbank a

where b.pk_cubasdoc=a.pk_cubasdoc
and d.pk_accbank=a.pk_accbank
and d.unitname<>b.custname
and d.unitname not like '江蘇省建工%'

相關文章
相關標籤/搜索