摘要:        
由数据ThreeLevelSortID KeyWordID KeyWordName2 142 key12 142 key23 143 key33 144...    阅读全文
posted @ 2014-10-06 22:30
dapeng888
阅读(264)
评论(0)
推荐(0)
        
            
        
        
摘要:        
set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgoALTER PROC [dbo].[usp_SRV_CheckServiceDemandOrder]@AInsNO NVARCHAR(50) =null,--必填@ACompanyName NVARCHAR(50)...    阅读全文
posted @ 2014-10-06 22:29
dapeng888
阅读(535)
评论(0)
推荐(0)
        
            
        
        
摘要:        
过去为了「想不通」而失眠,现在却因「忘不了」而整夜无眠,感觉这世界最伟大的爱还是「原谅」……曾经的「负翁」证明了我比那些「富翁」更有提升空间;男人靠能力,女人靠眼力啊.....身边亲人,恩人这么多的活菩萨都不敬,还跑东跑西去烧香有个屁用……别被我说中是你哦~~~想成功必须要迈过被亲人及朋友「小看」的...    阅读全文
posted @ 2014-10-06 22:19
dapeng888
阅读(1999)
评论(0)
推荐(0)
        
            
        
        
摘要:        
1、每年select year(ordertime) 年,sum(Total) 销售合计from 订单表group by year(ordertime)2、每月select year(ordertime) 年,month(ordertime) 月,sum(Total) 销售合计from 订单表gro...    阅读全文
posted @ 2014-10-06 21:34
dapeng888
阅读(2676)
评论(0)
推荐(1)
        
            
        
        
摘要:        
From:http://blog.sina.com.cn/s/blog_4388a973010007lh.htmlRANK ( ) OVER ( [query_partition_clause] order_by_clause )DENSE_RANK ( ) OVER ( [query_partit...    阅读全文
posted @ 2014-10-06 20:59
dapeng888
阅读(218)
评论(0)
推荐(0)
        
            
        
        
摘要:        
SELECT NAME,modify_date FROM sys.objectsWHERE NAME LIKE '%srv%'ORDER BY modify_date DESC    阅读全文
posted @ 2014-10-06 20:58
dapeng888
阅读(163)
评论(0)
推荐(0)
        
            
        
        
摘要:        
SELECT *,OBJECT_NAME(id) FROM syscomments    阅读全文
posted @ 2014-10-06 20:57
dapeng888
阅读(410)
评论(0)
推荐(0)
        
            
        
        
摘要:        
set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgoALTER FUNCTION [dbo].[ufn_getDateOfWeek](@Date Datetime)RETURNS nchar(1)ASBEGIN DECLARE @returnValue nchar(...    阅读全文
posted @ 2014-10-06 20:56
dapeng888
阅读(306)
评论(0)
推荐(0)
        
            
        
        
摘要:        
原文地址:http://hi.baidu.com/%BD%F0%D3%F1kl_y/blog/item/1c368ffba9388476024f5645.html--按mySql语法统计按周,月,季,年。income为合计的价格字段,createDate为交易时间。select sum(income...    阅读全文
posted @ 2014-10-06 20:55
dapeng888
阅读(2276)
评论(0)
推荐(0)
        
            
        
        
摘要:        
一条例子: select count(point_id) as today_sum from point where datediff(d,point_date,getdate())=0 关键语句: datediff(d,point_date,getdate())=0    阅读全文
posted @ 2014-10-06 20:54
dapeng888
阅读(295)
评论(0)
推荐(0)
        
            
        
        
摘要:        
ALTER proc [dbo].[SP_CreateInsertScript](@tablename nvarchar(256),@con nvarchar(400)) as begin set nocount on declare @sqlstr varchar(4000) declare @s...    阅读全文
posted @ 2014-10-06 20:53
dapeng888
阅读(361)
评论(0)
推荐(0)
        
            
        
        
摘要:        
ufn_GetWeekFirstAndEndDay 获取指定日期所在星期的第一天和最后一天日期ALTER FUNCTION [dbo].[ufn_GetWeekFirstAndEndDay](@tmpDate DATETIME)RETURNS @tmpTable TABLE( FirstDay D...    阅读全文
posted @ 2014-10-06 20:46
dapeng888
阅读(679)
评论(0)
推荐(0)
        
 
                    
                     
                    
                 
                    
                
 
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号