1 Regex regexSchool = new Regex("cugb", RegexOptions.IgnoreCase);
2 if (str[1].ToUpper().Equals(p.ToUpper() + p.ToUpper()) && regexSchool.IsMatch(str[3])) return true;
以上实现查找某串中是否还有某子串(不考虑大小写),也可以通过该正则表达式,来实现Replace,讲匹配的串替换掉。
1 select max(RunID) from Info where Userr like '%{0}%'
在使用Access SQL时,语句中涉及了max类聚合函数时,即使没找到记录,也会返回为空的值,相比select *就没有了,可能跟环境有关。
1 DatePart('yyyy', datee);
2 DatePart('m', datee);
3 DatePart('d', datee);
4
5 DatePart(yy, datee);
6 DatePart(mm, datee);
7 DatePart(dd, datee);
8
Access SQL时,用上面的,SQL Sever的用下面的,别的有的也可以。
在Access中新建表属性的时候,发现有的属性的某关键字是不可以用的,例如User,Language,Time这些,具体环境具体考虑吧。
感谢以下链接:
http://zhoufoxcn.blog.51cto.com/792419/280580
http://www.cnblogs.com/scottckt/archive/2008/08/07/1263262.html
http://databases.about.com/od/accessfunctionlibrary/a/functiondatepar.htm