二楼培训内容
1.net:用C#语言开发web
2.app的美化:用jquery和json
3.powerdesigner与动软等软件的使用。
4.开始的一天晚上发了一个sql2005的分页文档:
USE [test] GO --sql2005分页存储过程 /****** Object: StoredProcedure [dbo].[procSearchDataByPage] Script Date: 11/27/2015 19:17:54 ******/ SET ANSI_NULLS ON GO
SET QUOTED_IDENTIFIER ON --打开主键只写 GO
CREATE PROCEDURE [dbo].[procSearchDataByPage] ( @fromSql varchar(3000), @querySql varchar(2000), @whereSql varchar(1000), @orderBySql varchar(200), @keyField varchar(100), @PageSize int, --每页多少条记录 @PageIndex int, --指定当前为第几页 @TotalRecord int output --返回总记录数 ) AS BEGIN declare @sql varchar(8000) declare @totalCountSql nvarchar(4000) declare @StartRecord int declare @EndRecord int declare @nPageCount int --处理开始点和结束点 whereSql IF (@whereSql! = '' AND @whereSql IS NOT NULL) set @whereSql=' where '+ @whereSql else set @whereSql='' --计算总条数 fromSql set @totalCountSql= N'select @TotalRecord = count(*) from ' + @fromSql+@whereSql --总记录数语句 exec sp_executesql @totalCountSql,N'@TotalRecord int out',@TotalRecord output;--返回总记录数 if(@PageSize>-1)--页码显示数量 begin set @nPageCount =CONVERT(int, ceiling(@TotalRecord*1.0/@PageSize)) --向上取整 if(@nPageCount=0 and @PageIndex != 0) set @PageIndex = 0 else if (@PageIndex > (@nPageCount - 1)) set @PageIndex = 0 set @StartRecord = (@PageIndex)*@PageSize + 1 set @EndRecord = @StartRecord + @PageSize - 1 --组织Sql语句 set @sql ='(select row_number() over (order by '+ @orderBySql +') as rowId,'+@querySql+' from '+ @fromSql+@whereSql;--查询语句 set @sql ='select * from ' + @sql + ') as t where rowId between ' + ltrim(str(@StartRecord)) + ' and ' + ltrim(str(@EndRecord)); end else begin IF (@orderBySql! = '' AND @orderBySql IS NOT NULL) set @orderBySql=' order by '+ @orderBySql else set @orderBySql='' set @sql='select '+@querySql+' from '+ @fromSql+@whereSql+@orderBySql end PRINT(@sql) Exec(@sql) END
GO