select 表A.住院号, 表A.姓名, 表A.项目, 表A.金额, 表B.结算时间
from 表A, 表B
where 表A.住院号=表B.住院号
  and 表B.结算时间>='20060324' and 表B.结算时间<='20060325'b中的住院号应该是唯一的吧

解决方案 »

  1.   

    select a.*,b.结算时间 from A a,B b
    where a.住院号=b.住院号
    and b.结算时间 between '20060324' and '20060325'
    order by a.住院号,a.金额没测试过,有错楼下的更正
      

  2.   

    select 表a.住院号,表a.姓名, 表a.项目, 表a.金额,表b.结算时间
    from 表a,表b
    where 表a.住院号=表B.住院号
    and to_char(结算时间,'yyyymmdd')>='20060324'
    and to_char(结算时间,'yyyymmdd')<='20060325'
      

  3.   

    select 表a.住院号,表a.姓名, 表a.项目, 表a.金额,表b.结算时间
    from 表a,表b
    where 表a.住院号=表B.住院号
    and to_char(结算时间,'yyyymmdd')> between '20060324' and '20060325'
      

  4.   

    select 表a.*, ,表b.结算时间
    from 表a,表b
    where 表a.住院号=表B.住院号
    and to_char(结算时间,'yyyymmdd')> between '20060324' and '20060325'