select * from bd_cubasdoc where pk_cubasdoc in ( select pk_cubasdoc from bd_custbank where account='37101986106051026069')
查询空客商客户银行的单位名称
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行。
select d.bankacc,d.bankname,d.unitname,d.ts from bd_accbank d where unitname is null
136行。
查询客商名称和单位名称不一样的
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 '江苏省建工%'