- 博客(2)
- 资源 (1)
- 收藏
- 关注
转载 sql 统计一段时间内的工作日(除去星期六,星期天)
declare @s datetime,@e datetime set @s='20130501' set @e='20130522' select days/7*5+ --统计整周的工作日 days%7- --统计不是整周的天数 case when 6 between wd and wd+days%7-1 then
2013-05-23 08:44:26
2745
原创 字符串自动表示列(组合自动表示列)
代码如下:------先定义一张表--创建测试表create table tb( id char(5) not null, name varchar(10), pkey varchar(2))goalter table tb add constraint pk_tb primary key(id)go-----先自定义一个组合函数(产生组合标识列)--自定义函数组合标识crea
2010-01-08 08:20:00
459
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人