摘要:CREATE FUNCTION kmes.WorkDay_f(@dt_begin datetime,@dt_end datetime)RETURNS intASBEGIN DECLARE @workday int,@i int,@bz bit,@dt datetime s...
阅读全文
摘要:原始表中的数据如下所示: 需求得到如下结果: SQL如下: SELECT prodline, week, weekday, weekdaysip, Dateadd(dd, CONVERT(INT, RIGHT(week, 2)) * 7...
阅读全文
摘要:项目中要从Web端根据维护的参数在Cube中创建KPI,查了一天多资料,只查到MSDN中有一个"CREATE KPI..."的写法比较靠谱,可是把它拷到Analysis Services MDXQuery中执行,发现KPI根本就不是关键字,这怎么能执行得了。急死人了。到最后才发现"CREATE KP...
阅读全文
摘要:来自: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> http: //www.pconline.com.cn/pcjob/other/data/o...
阅读全文
摘要:DECLARE @price_date DATETIME SET @price_date = CONVERT ( DATETIME , ' 2007-01-01 ' ) WHILE @price_date <= CONVERT ( DATETIME , ' 2007-12-3...
阅读全文
摘要:/* *****TableUpdate***** */ IF EXISTS ( SELECT 1 FROM syscolumns WHERE id = object_id ( ' bp_list_detail ' ) AND name = ' additional_cost '...
阅读全文