X xmdsj Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-17 #1 我用的是interbase数据库.其中一个表中有一个日期时间型字段. 请问如何用QUERY查询出某个月(或某一年)的数据?
X Xerxes Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-17 #2 year: select * form tablename where f1 >= '1/1/2002'and f1 < '1/1/2003' m: select * form tablename where f1 >= '1/1/2002'and f1 < '2/1/2002'
year: select * form tablename where f1 >= '1/1/2002'and f1 < '1/1/2003' m: select * form tablename where f1 >= '1/1/2002'and f1 < '2/1/2002'
N NetBird Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-17 #3 year: select * form tablename where f1 between '1/1/2002'and '1/1/2003' m: select * form tablename where f1 between '1/1/2002'and '2/1/2002'
year: select * form tablename where f1 between '1/1/2002'and '1/1/2003' m: select * form tablename where f1 between '1/1/2002'and '2/1/2002'
J JUMP1972 Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-17 #4 1、查询access的数据库: select * from tablename where adate>#2000-12-12#; 2、查询SQL Server的数据库: select * from tablename where adate>'2000-12-12';
1、查询access的数据库: select * from tablename where adate>#2000-12-12#; 2、查询SQL Server的数据库: select * from tablename where adate>'2000-12-12';
M mtj Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-17 #5 select * form tablename where f1 between :Begin and :end query1.parameters[0].asdatetime := startoftheday(now); query1.parameters[1].asdatetime := endoftheday(now);
select * form tablename where f1 between :Begin and :end query1.parameters[0].asdatetime := startoftheday(now); query1.parameters[1].asdatetime := endoftheday(now);
X XdxDaxiong Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-17 #6 Query1.close; Query1.sql.clear Query1.sql.text:='select * from tablename filedname='''+datetostr(date)+''''; Query1.open;
Query1.close; Query1.sql.clear Query1.sql.text:='select * from tablename filedname='''+datetostr(date)+''''; Query1.open;
X xuxincheng Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-17 #7 local database 可以用EXTRACT函数提取year,month,day 例: SELECT DOB, LastName, FirstName FROM People WHERE (EXTRACT(MONTH FROM DOB) = 5)
local database 可以用EXTRACT函数提取year,month,day 例: SELECT DOB, LastName, FirstName FROM People WHERE (EXTRACT(MONTH FROM DOB) = 5)
X xmdsj Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-17 #8 XdxDaxiong 的方法应该不行吧. 怎么没有 where?