有关SELECT DATEDIFF(day,indate, getdate()) AS Jdate问题(0分)

  • 主题发起人 主题发起人 kitty_li
  • 开始时间 开始时间
K

kitty_li

Unregistered / Unconfirmed
GUEST, unregistred user!
查询与当前日期相差一年以上的记录?
SELECT DATEDIFF(day,indate, getdate()) AS Jdate
FROM B1010 GROUP BY indate having jdate>=365
请问如何将查询出来的结果集中Jdate>=365 记录筛选出来?
SELECT DATEDIFF(day,indate, getdate()) AS Jdate
FROM B1010 GROUP BY indate having jdate>=365 或
SELECT DATEDIFF(day,indate, getdate()) AS Jdate
FROM B1010  where Jdate>=365 都不可以
 
后退
顶部