2013年1月11日

SQL Server-拆分字符串返回表(存储过程)

摘要: SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER function [dbo].[f_split](@SourceSql varchar(max),@StrSeprate varchar(10))returns @temp table(a varchar(100))--实现split功能 的函数asbegindeclare @i intset @SourceSql=rtrim(ltrim(@SourceSql))set @i=charindex(@StrSeprate,@SourceSql)while @i>=1begininsert 阅读全文

posted @ 2013-01-11 17:12 沸石 阅读(241) 评论(0) 推荐(0) 编辑

ASHX 生成excel文件

摘要: private void GetCandidateExcelConverter(HttpContext context) { System.Web.HttpResponse response = System.Web.HttpContext.Current.Response; // Workbook excelWorkbook = new Workbook(); string originalFile = context.Server.MapPath("~/webservice/report.xlsx"); Workbook ex... 阅读全文

posted @ 2013-01-11 15:34 沸石 阅读(4125) 评论(0) 推荐(0) 编辑

SQL Server-动态Pivot表的存储过程

摘要: /****** Object: StoredProcedure [dbo].[pivotsp] Script Date: 01/11/2013 14:08:29 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER PROC [dbo].[pivotsp]@query AS NVARCHAR(MAX), -- The query, can also be the name of a table/view.@on_rows AS NVARCHAR(MAX), -- The columns that will be regular ro 阅读全文

posted @ 2013-01-11 14:13 沸石 阅读(478) 评论(0) 推荐(0) 编辑

导航