以文本方式查看主题

-  蓝色快车PB俱乐部论坛  (http://pb.besoft.com.cnhttp://pb.besoft.com.cn/bbs/index.aspindex.asp)
--  PowerBuilder MIS编程  (http://pb.besoft.com.cnhttp://pb.besoft.com.cn/bbs/index.aspbbs.asp?boardid=1)
----  在库中准确检索出生日在最近3天内的人员  (http://pb.besoft.com.cnhttp://pb.besoft.com.cn/bbs/index.aspdispbbs.asp?boardid=1&rootid=292&id=2923)


--  作者:apo
--  发布时间:2003/6/8 1:22:12

--  在库中准确检索出生日在最近3天内的人员
我所使用的PB环境为:win2000 , SQLSERVER2000 , PB8.01版

有客户表 id,name,birthday字段,现在要准确检索出生日在最近3天内(即:今天,明天, 后天)的所有客户(其中birthday为datetime类型)

请教:怎样用SQL语句实现呢? 
  


--  作者:zhegao
--  发布时间:2005/5/9 8:15:56

--  
select * from table name where birthday between getdate()-1 and getdate()+2

">