select 发票企业名称,收票企业名称,金额 from 票据余额账 a,企业录 b where 票据编号='22222' and a.企业代码=b.企业代码;

解决方案 »

  1.   

    select 发票企业代码,发票企业名称,金额 from 票据余额账,企业录 where 票据编号='22222' and 收票企业代码 = 企业代码;
      

  2.   

    select (select 发票企业名称 from other_table a where a.发票企业代码=发票企业代码) 发票企业名称,(select 收票企业名称 from other_table b where b.收票企业代码=收票企业代码) 收票企业名称 ,金额 from 票据余额账 where 票据编号='22222'
      

  3.   

    sorry,
    select 发票企业名称,收票企业名称,金额 from 票据余额账 a,企业录 b where 票据编号='22222' and a.发票企业代码=b.企业代码 and a.收票企业代码=b.企业代码;