他说得很对:
先声名变量 declare @time datetime
为变量赋值 select @time=2007-01-10
带入查询语句 select * from 表 where 时间=@time
你的引号打的不对,正确如下:cursor=exec(conn,"SELECT ALL 日期 FROM OriginalInfo WHERE 日期='"&date&"' and 证券代码='"&scode&"' ")
楼上的有点笔误s.open "select * from gqxx where yz=1 and gq='" &bianliang &"' order by id desc", conn, 1, 1
注意 gq=' ,后面有个单引号。后面的 ' order 也是。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)