郁闷,msn上不去,没法干活。
记上最近项目中用到的一些code snippet
1.查询今天的记录
select datediff(dd,ConvDateTime,getdate()),* from dbo.rbConversationMaster where datediff(dd,ConvDateTime,getdate())=0
Returns the number of date and time boundaries crossed between two specified dates.
DATEDIFF ( datepart , startdate , enddate )
datepart
Is the parameter that specifies on which part of the date to calculate the difference. The table lists dateparts and abbreviations recognized by Microsoft® SQL Server™.
Datepart | Abbreviations |
---|---|
Year | yy, yyyy |
quarter | qq, q |
Month | mm, m |
dayofyear | dy, y |
Day | dd, d |
Week | wk, ww |
Hour | hh |
minute | mi, n |
second | ss, s |
millisecond | ms |
(I) 您现在可以输入另外一个客户的姓名(比如 Maria 或 Maria Anders)继续查询,或者输入 b 或 back 重新显示菜单提示,输入 help 或 ? 返回到主菜单。
表达式:
(\[[^\]]+\])
匹配代码:
(2) 如下内容匹配出 for i 到 next 中间的内容,group
:-O 系统中有多个客户的姓名类似,并符合您的查询要求:
for i[CompanyName] 的 [ContactName],他的职位是 [ContactTitle]
next
(I) 您现在可以输入序号来显示指定客户的详细信息,或者输入 b 或 back 重新显示菜单提示,输入 help 或 ? 返回到主菜单。
表达式:
(for i)([^\r|\n]+(\r|\n))next
匹配代码: