救命!ADO的Query控件怎么对access的日期进行表较,Access的驱动连标准sql语法都不支持!

火鸟33 2001-04-11 03:19:00
救命!ADO的Query控件怎么对access的日期进行表较,Access的驱动连标准sql语法都不支持!
...全文
65 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
孩皮妞野 2001-04-12
  • 打赏
  • 举报
回复
In Access:

select * from table1 where thedate>#2000-3-5# and thedate<#2000-4-5#
火鸟33 2001-04-12
  • 打赏
  • 举报
回复
举个列;如选择2000-3-5 到 2000-4-5 的纪录:
select * from tabel1 where thedate>'2000-3-5' and thedate<'2000-4-5 '
???
这句能在sql server 上通过,不能再access 通过
我用标准sql语法;

select * from tabel1 where thedate>DATE '2000-3-5' and thedate<DATE '2000-4-5 '
也出错

孩皮妞野 2001-04-11
  • 打赏
  • 举报
回复
我一向都是用ADOQuery存取Access的,没问题。

Access支持一种略变态的Transact-SQL, 查Access帮助,在Access的查询中试验无误后再写到你的程序中。

Try something like this:

select * from diary order by [date] desc;

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧