| 查看: 1029 | 回复: 3 | |||
[交流]
以步长steptime比如5分钟重复调取表中数据处理(含时间字段)出来处理咋写?
|
|
以步长steptime比如5分钟重复调取表中数据处理(含时间字段)出来处理咋写?下面代码对吗? endtime:=firsttime; for i:=1 to n do starttime:=endtime; endtime:=IncMinute(endtime,steptime); begin //查询,处理数据 end; |
» 猜你喜欢
280求调剂
已经有7人回复
环境领域全国重点实验室招收博士1-2名
已经有5人回复
303求调剂
已经有6人回复
290求调剂
已经有10人回复
0703化学求调剂 总分331
已经有3人回复
一志愿天津大学化学工艺专业(081702)315分求调剂
已经有8人回复
0703化学调剂
已经有3人回复
材料,纺织,生物(0856、0710),化学招生啦
已经有9人回复
一志愿中国海洋大学,生物学,301分,求调剂
已经有3人回复
0703化学调剂 ,六级已过,有科研经历
已经有9人回复

|
// ¿ªÊ¼Ñ­»·´¦Àí TimeEnd:=firsttime; TimeStart:=firsttime; for i:=1 to peroidup do TimeStart:=TimeEnd; TimeEnd:=IncMinute(TimeEnd,steptime); begin // ²éѯʱ¼ä¶ÎÊý¾Ýµ½ tempttable query1.Close; query1.Sql.clear; query1.sql.add('select * into tempttable from data1sector1 where'); query1.sql.add('ʱ¼ä > TimeStart'); query1.sql.add('and ʱ¼ä <= TimeEndt'); //#2013-08-13 00::01::18# query1.execsql; end; |

2楼2013-10-11 02:05:37

3楼2013-10-15 10:14:55
|
with table5 do begin k:=0; first; while not eof do begin k:=k+1; x[k]:=table5.fieldbyname('x').Value; y[k]:=table5.fieldbyname('y').Value; next; {x2:=table5.fieldbyname('x').Value; y2:=table5.fieldbyname('y').Value; dis:=sqr((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));} end;//end table5 while not eof do end;//end with table5 do //求max_k *sametimetable中的行数 query1.close; query1.SQL.clear; query1.SQL.add('select count(*) from sametimetable '); Query1.execsql; max_k:=query1.fields[0].asinteger; //求max_k S5:=0; //初始化S5 for l:=1 to max_k do begin for m:=2 to max_k do begin if l=m then continue; parter[l,m]:=sqrt(Power((y[m]-y[l]),2)- Power((x[m]-x[l]),2)); if parter[l,m]>9.26 then continue else S5:=S5+1; end; end;// for l:=1 to max_k do |

4楼2013-10-15 21:46:11













回复此楼