report中还有date表是时间字段

解决方案 »

  1.   

    select b.prodname as "商品名称", c.etname as "厂名", a."价格" as "价格"
    from report a, prod b, et c
    where a.prodid = b.prodid (+)
    and a.etid = c.etid (+)
    and a.prodid = '某商品'
    and a.etid = '某厂'
    and a.date between <某时间段begin> and <某时间段end>
    ;This SQL can be performed only when the field "prodid" of "prod" table and the field "etid" of "et" table are primary keys!!