注册 登录
编程论坛 SQL Server论坛

查错(这句查询语句应如何写)

jxawgyl 发布于 2008-06-08 10:27, 896 次点击
这句话是:select * from AdviceListView  where  roomcode=2000
    and sendopecode>0
     and exectime>''
     and exectime<''   
     and patname like '%'
     and medname like '%'
     and offcode =''
     order by intime desc
这是我在VB中按键用的语句,其中只有当OFFCODE为空时,查询不到数据,为什么呢?请各位帮我看一下,
1 回复
#2
卜酷塔2008-06-14 13:47
and exectime>''
     and exectime<''
是不是这个地方的问题啊?
你吧这两句去掉试试
1