
vb中如何写sql查询条件
TmpSource="SELECTl.MsgIdas编号,l.Mobileas号码,l.Send_datetimeas发送时间,l.Sendtypeas发送类型,l.Se...
TmpSource = "SELECT l.MsgId as 编号,l.Mobile as 号码,l.Send_datetime as 发送时间,l.Sendtype as 发送类型,l.SendResult as 发送结果,l.MsgContent as 短信内容" _ + " FROM SendHistory l WHERE Send_datetime like " _ + % 月 % s 和 ss,sover都为string TmpSource = "SELECT l.Send_datetime as 发送时间,l.MsgContent as 短信内容" _ + " FROM SendHistory l WHERE Send_datetime like +" _ + " '" + s + "%'" And Send_datetime > ss And Send_datetime < sover 现在编译的时候说类型不匹配 是不是like后的换行符引起的错误啊
展开
展开全部
sql="select
*
from
(表格名字)
where
id='"
&
text1.text
&
"'
and
name='"
&
text2.text
&
"'
and
age="'
&
text3.text
&
"'
order
by
id
asc"
order
by
id
asc
这句意思是按id升序排列,可写可不写。
*
from
(表格名字)
where
id='"
&
text1.text
&
"'
and
name='"
&
text2.text
&
"'
and
age="'
&
text3.text
&
"'
order
by
id
asc"
order
by
id
asc
这句意思是按id升序排列,可写可不写。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询