一句话搞定生日提示

select * from yuan where replace(Bir,year(Bir),year(getdate()))-getdate() between 0 and 7

7天内生日提示:bir为字段名

 

下例用 xxx 替换 abcdefghi 中的字符串 cde。

SELECT REPLACE('abcdefghicde','cde','xxx')
GO

下面是结果集:

------------
abxxxfghixxx

posted @ 2008-07-23 15:50  melody&bobo  阅读(203)  评论(0编辑  收藏  举报