select *
from TMS_OFFER_PRICE a
where a.route = '科技園區-科技園區'
and a.state = 'Y'
and sysdate between a.effect_date and
nvl(a.actuallost_date, a.lose_date)
select * from TMS_OFFER_PRICE a where a.route = '科技園區-科技園區' and a.state = 'Y' and sysdate between a.effect_date and nvl(a.actuallost_date, a.lose_date) 上图是查的表,把TMS_OFFER_PRICE 表里列内容不为空的和下面图的offer_price里的值对应,查出TMS_OFFER_PRICE_TRUCK_TYPE表里的type 就是TMS_