我在程序中有这样的一句:
update ac_Record set
ac_record.EnterTime = (SELECT Min(inTime) FROM ent_rec
where (ent_rec.inTime between
ac_record.BeginTIme and ac_record.EndTime)
and (ent_rec.uID = ac_record.staffID)),
ac_record.LeaveTime = (SELECT Max(inTime) FROM ent_rec
where (ent_rec.inTime between
ac_record.BeginTIme and ac_record.EndTime)
and (ent_rec.uID = ac_record.staffID))
FROM ac_record, Ent_Rec
WHERE ac_record.datet between
'2004-8-3' and '2004-8-2'在我的开发的电脑上一切正常,但装到别的电脑上总是出现执行超时错误,请高手帮忙。
waiting online, thank you very much
update ac_Record set
ac_record.EnterTime = (SELECT Min(inTime) FROM ent_rec
where (ent_rec.inTime between
ac_record.BeginTIme and ac_record.EndTime)
and (ent_rec.uID = ac_record.staffID)),
ac_record.LeaveTime = (SELECT Max(inTime) FROM ent_rec
where (ent_rec.inTime between
ac_record.BeginTIme and ac_record.EndTime)
and (ent_rec.uID = ac_record.staffID))
FROM ac_record, Ent_Rec
WHERE ac_record.datet between
'2004-8-3' and '2004-8-2'在我的开发的电脑上一切正常,但装到别的电脑上总是出现执行超时错误,请高手帮忙。
waiting online, thank you very much
解决方案 »
- 实在做不了了,pascal语言翻译为C语言
- 昨晚在东莞惨遭飞抢, 运气好没被抢到, 散400分消灾(1)
- 菜鸟求教:在使用adoquery1.parambyname中为什么出现[Error]Undeclared identifier: 'parambyname'
- 如何获取datatimepicker控件的时间值?
- 请问各位大侠,Indy的TCPServer如何知道client已失去联系?
- 请问如何让数据库的几张表在需要的时候分别用一个cxgrid显示,详细情况请进
- 请问那里有游戏平台的服务器端下载???
- 有用oracle的吗,我买了一套oracle9,7张盘的在几种操作系统下面都装不上,点击setup没有反应,同事买的也是这样,希望大家指教
- 一个有关于SQL的问题?,请各位高手捡分?
- 有关TIdUDPServer的一个问题!
- 当进程被杀死时,执行的程序代码段如何写
- 如何判断窗口中是否有名为newuser的label控件?如何写呢?
但在我的电脑上只要几十毫秒就执行玩了的呀
update as_record set
ac_record.entertime=b.maxtime,acrecord.leavetime=b.mintime
from (select uid,max(intime) as maxtime,min(intime) as mintime from
ent_rec where ent_rec.intime between ... and ... ) b
where a.staffid=b.uid
and a.datet between...and...
建義用存储过程来解決。
是BDE还是ADO,用的什么接口?
如果是ADO,升级一下看看
如果是BDE,建议用Query+UpdateSQL
你在程序执行的时间用监视器跟踪一下,看看执行的是直接的语句还是加了一大堆的动作
WHERE ac_record.datet between '2004-8-3' and '2004-8-2'二)対字段付値的条件句↓
where (ent_rec.inTime between ac_record.BeginTIme and ac_record.EndTime)
and (ent_rec.uID = ac_record.staffID) 建義対表「ent_rec」建索引文件、可加速捜査。
CREATE INDEX yourIndex ON ent_rec (inTime, uID)