【转】ACCESS中如何在SQL语句的WHERE条件中加日期条件
转自
http://topic.csdn.net/t/20050110/09/3711952.html
access中时间要用#,不是双引号
select * from kc where rq < #2000-01-01# and rq>#2002-01-01#
不要用between,它的效率泰低
使用# 而不是使用单引号
相关文档:
USE [sfaecrm]
GO
/****** 对象: StoredProcedure [dbo].[proc_insert] 脚本日期: 05/29/2009 06:16:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[proc_insert] (@tablename varchar(256))
as
begin
set ......
一、问题
select UserID,LastName,FirstName,UserName from SYSUser
UserID LastName FirstName UserName
------------------------------------------------------
1 A B C
2 &nb ......
CONVERT 函数 [数据类型转换]
--------------------------------------------------------------------------------
功能
返回转换成提供的数据类型的表达式。
语法
CONVERT ( data type, expression [ , format-style ] )
参数
data&nbs ......
create table tabReProc
(
name varchar(30),
age integer,
primary key(name,age)
)
insert into tabReProc values('x7700',20)
insert into tabR ......