取连续合约数据,可以对表A中的每一行,分别提交一个query,最后用union合并
def getTickData(dict){
?curDate = dict.TradingDay
?curID = dict.InstrumentID
?curProductID = curID.left(2)
?return select TradingDay, UpdateTime, InstrumentID, LastPrice from loadTable("db", "tick") where TradingDay = curDate, ProductId =curProductID, InstrumentID = curID
}
ploop(getTicketData, A).unionAll(false)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…