易截截图软件、单文件、免安装、纯绿色、仅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


相关问答:

关于group by的sql语句?

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

总会碰到怪的问题,sql问题

sql2005
select *from v_ddxx where d_sfsc='0' and (g_ssbm='1001' or g_ssbm='1002') and (xxf>0 and  xxfwzf <>0 ),执行速度慢的要死,但是如果把(xxf>0 and  ......

sql 问题

DateTime startTime=DateTime(em_1.Text)
DateTime endTime=DateTime(em_2.Text)

string sql
sql = dw_1.GetSQLSelect()+"Where (StartTime> '"+startTime+"') and (EndTime ......

SQL字段,横向展开

请问各位,如何将SQl中,某字段中的值横向展开呢,
CASE WHEN

具体问题具体分析,看你要怎么展开

姓名  科目      成绩
张三  英语    90
李四  英语&nb ......

dbf表导入到sql server2000表问题

请问:
1,如何将一张dbf表导入到sql server2000中的一张表。使用DTS该怎样实现?
2,使用网上代码:
Insert Into Tb_cj Select * from openrowset('MSDASQL','Driver=Microsoft Visual FoxPro D ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号