请问在SQL Server中怎样得到一个日期型字段的整数部分? 试一试:Cast(datefield As integer) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Order By Cast(datefield As Integer),OK ? 谢谢arfeiz,只不过Access与SQL是有些差别的,eg:date1 11/21/01 1:54:46 date2 11/21/01 23:54:46 如果用int(date1),int(date2)在Access中得到结果是一样的。即int(date1)==int(date2)但在Sql Server中用Cast([date1] As Integer) 来得到的结果不一样Cast([date1] As Integer) <>Cast([date2] As Integer) 按此需求该如何设计数据库 如何把001转化成字符串‘001’或001t作为一个参数查询为什么出错 怎么连接局域网的SQL 求sql. 一个是否数据库空间不够的问题!请教 这个sql语句怎么写?有点郁闷 这两个触发器怎么写? 一个sql 查询 急!sql导入Access问题 查询数据库时,怎样让重复项的某个不重复字段合并 如何在sql7中调试存储过程 一个字段既是主键又是外键,可以吗?
eg:
date1 11/21/01 1:54:46
date2 11/21/01 23:54:46
如果用int(date1),int(date2)在Access中得到结果是一样的。
即int(date1)==int(date2)
但在Sql Server中用Cast([date1] As Integer) 来得到的结果不一样
Cast([date1] As Integer) <>Cast([date2] As Integer)