Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

SQLÓï¾ä

time1=format(now,"hh:mm:ss")
fromtime,totime

sCmd = "Update Tables Set SiteStatus=1 Where TableName In (Select TableName from tableBook Where BookDate='" & Format(Now, "yyyy-mm-dd") & "' And DatePart=" & tmpDatePart & " and  fromTime < " & time1 & " and  " & time1 & " < ToTime ) And  SiteStatus <2"

error: fromTime < " & time1 & " and  " & time1 & " < ToTime

time1=format(now,"hh:mm:ss")
fromtime=Format(DTPicker1.Value, "hh:mm:ss")
Totime=Format(DTPicker2.Value, "hh:mm:ss")
¸ñʽÊÇÒ»ÑùµÄ


ÐÞ¸ÄÒ»ÏÂ
sCmd = "Update Tables Set SiteStatus=1 Where TableName In (Select TableName from tableBook Where BookDate='" & Format(Now, "yyyy-mm-dd") & "' And DatePart=" & tmpDatePart & " and  fromTime < #" & time1 & "# and  ToTime > #" & time1 & "# ) And  SiteStatus <2"

À´ÍíÁË,¶¥Ò»ÏÂ

Ò²¿ÉÒÔÕâÑùд
sCmd = "Update Tables Set SiteStatus=1 Where TableName In (Select TableName from tableBook Where BookDate='" & Format(Now, "yyyy-mm-dd") & "' And DatePart=" & tmpDatePart & " and  #" & time1 &a


Ïà¹ØÎÊ´ð£º

ÇóSQL£¿

´ó¼ÒºÃ£¬ÇëÎÊÔÚ±íMÖÐÓÐ×ֶΣºa b c d e 
ÎÒÏë²é³öÆäÖÐÂú×ãÏÂÃæÈÎÒâÒ»ÏîµÄÊý¾Ý£¬1.×Ö¶Îa µÄÖµ²»ÊÇ ¡®Êé»ò±Ê»ò±¾¡¯ÖÐÈÎÒ»£¬2.aΪÊéµÄʱºò×Ö¶Îb,cÊÇ¿Õ;3.µ±aֵΪ±ÊµÄʱºòdÊÇ¿Õ;4.µ±aΪ±¾µÄʱºòb,d,e¶¼ÊÇ¿Õ;5.È ......

¹ØÓÚgroup byµÄsqlÓï¾ä£¿

  with adod_dict do
    begin
    close;
    commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd=:tnd group by bgqxcode'; ......

csvÎļþת»»³Ésqlµ¼Èëµ½Êý¾Ý¿â£¬Ã»ÓÐÊý¾ÝΪºÎ£¿

Ö´ÐеÄ˳Ðò£º
1£©Îļþä¯ÀÀ¿ò£¨Ñ¡ÔñÎļþʹÓã©
Ñ¡ÔñºÃÎļþºó
µã»÷Ò»¸öµ¼Èë°´Å¥µÄʱºò £¬°ÑÉÏÃæÉÏ´«¿òÀïµÄcsvÎļþÒÔÒ»¸öIDΪÎļþÃû£¬ÉÏ´«µ½**/**Îļþ¼ÐÏÂ
2£©¶ÁÈ¡Õâ¸öÎļþ¼ÐϵÄcsvµÄÎļþ£¬×ª»»³Ésql
3 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ