像六哥说的,定义一个时间起止日期的表。每次ETL第一个先更新这个时间表。t(startDate,endDate,currDate)然后你的sql=> select * from a where a>=(select starDate from t where currDate=今天) and a
显示全部像六哥说的,定义一个时间起止日期的表。每次ETL第一个先更新这个时间表。
t(startDate,endDate,currDate)
然后你的sql=> select * from a where a>=(select starDate from t where currDate=今天) and a<=(select endDate from t where currDate=今天)。
如果你还要精确的时分秒,可以再加一列,time类型。
希望有帮助。
收起