- 浏览: 40247 次
- 性别:
- 来自: 杭州
最新评论
文章列表
Here is an example using backupset.
If I understood what you were asking for this should be it. It outputs the data as datatype TIME.
If you want datetime then replace CAST('00:00:00' AS TIME)) with '1/1/1900'.
SELECT database_name, DATEADD(ss,datediff(ss,backup_start_date, backup_finish_d ...
SQL Server DMVs
- 博客分类:
- SQL Server
扫盲: DMV = Dynamic Management Views,动态管理视图
Microsoft introduced a few more dynamic management views to also assist with identifying possible index candidates based on query history.
The dynamic management views are:
sys.dm_db_missing_index_details - Returns detai ...
SELECT DATEADD(SECOND,AVG(DATEDIFF(SECOND, 0, CAST(MyDateTimeColumn as TIME))), 0)
FROM MyTable
如何去做不想做的事情的 - 10个建议
- 博客分类:
- 职场
如果工作遇到困难,不想继续;如果学习没有动力,时断时续;如果生活被琐事牵绊,提不起劲……
请读读下面的文章:如果去做不想做的事情。
如果每时每刻,我们可以只做我们内心想做的事情,那该有多好。
可是不 ...
1. Create the view with 'SCHEMABINDING'
CREATE VIEW [dbo].[vTest] WITH SCHEMABINDING AS
SELECT
2. Create the index
CREATE UNIQUE CLUSTERED INDEX idx_vTest ON vTest(IndexColumn)
3. Constrains:
The view must have been created with certain SET options, such as QUOTED_IDENTIFIER and CONCA ...
1. Truncate NoDup table
2. Create CTE1 to get the max MyTime group by FileName and Month
TRUNCATE TABLE NoDup;
;WITH CTE1 AS
(SELECT FileName, Max(MyTime) AS MaxMyTime
FROM SourceTableDup
GROUP BY FileName, CONVERT(VARCHAR(10),MyTime,10))
3. Select the target columns from SourceTable
4. Joi ...
We can use CTE (common table expression) to get a list of month.
;WITH DateYear AS
(
SELECT 0 AS num
UNION ALL
SELECT num + 1 FROM DateYear
WHERE num < 11
)
SELECT CONVERT(DATE,DATEADD(MONTH,(num-13),convert(datetime, '20140401', 110))) AS MyMonth from DateYear
If you have multipel ...
http://blogs.office.com/2011/08/17/making-sense-of-dollar-signs-in-excel/
Dollar signs indicating absolute references
You probably know that a formula can refer to cells. That’s one reason Excel formulas are so powerful — the results can change based on changes made in other cells. Whe ...
Tutorial:
http://dataqueen.unlimitedviz.com/2011/06/how-to-use-a-sharepoint-list-as-a-data-source-in-your-ssis-package/
How to find the list name? I can only find the .ASPX site.
1. Export to Spreadsheet and save owssvr.iqy
2. Edit owssvr.iqy in Notepad++
职场急诊室——谁没一点病
- 博客分类:
- 职场
你要相信你所认真做的每一件事,都一定会对你的未来起到帮助。这个世界对于“认真”两个字,是有回报的。
很多事情,我们下判断,不仅仅根据答案的内容,还要根据回答的人。
我们的价值就是被人利用的价值,一旦你失去了被利用的价值,你就失去了做人的价值。
如何去引导受众,而不是根据受众需要什么才去做什么,否则乔布斯的苹果也不会那么的火。
今天的暂时不顺,就是荒废了昨天造成的,明天赶紧加油,后天就不会抱怨。
很多焦躁焦虑不确定,你以为是你没有获得别人的认可,其实是你没有打下坚实的根基而造成的忧虑。
Part 1: Introduction to Spring 3.0 MVC framework
Part 2: Create Hello World Application in Spring 3.0 MVC
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-va ...
Excel Percentile
- 博客分类:
- Excel
Excel: PERCENTILE.INC(A1:A5,0.2) = 1.6
Steps:
1. a = 0, 2, 3, 4, 5
2. percent = 0.2
3. n = 5
4. k = TRUNC(percent * (n – 1) + 1) = TRUNC(0.2 * 4 + 1) = TRUNC (1.8) = 1
5. f = percent * (n-1) – TRUNC(percent*(n-1)) = 0.8 – TRUNC(0.8) = 0.8
6. output = ...
Reference:
http://www.devx.com/vb2themax/Tip/18663