09 2012 档案
ExtASP.NET开发中日历或下拉列表控件被Grid++Report插件挡住的解决办法
摘要:ExtASP.NET开发中日历或下拉列表控件被Grid++Report插件挡住的解决办法:只需要在末尾追加下面的几句话就行了:<script type="text/javascript">//防止Ext控件被 ActiveX挡住Ext.useShims = true;</script> 阅读全文
posted @ 2012-09-24 08:47 承志软件.张 阅读(177) 评论(1) 推荐(1)
修改SqlServer存储过程的Sql语句
摘要:SET QUOTED_IDENTIFIER ON GOSET ANSI_NULLS OFF GOcreate procedure sp_password @old sysname = NULL, -- the old (current) password @new sysname, -- the new password @loginame sysname = NULL -- user to change password onas -- SETUP RUNTIME OPTIONS / DECLARE VARIABLES --set nocount on declare @self int s 阅读全文
posted @ 2012-09-24 08:36 承志软件.张 阅读(746) 评论(0) 推荐(0)
生成交叉表的SQL语句
摘要:SET QUOTED_IDENTIFIER ON GOSET ANSI_NULLS ON GO/*--生成交叉表的简单通用存储过程 根据指定的表名,纵横字段,统计字段,自动生成交叉表 并可根据需要生成纵横两个方向的合计 注意,横向字段数目如果大于纵向字段数目,将自动交换纵横字段 如果不要此功能,则去掉交换处理部分 --邹建 204.06--*/ /*--调用示例 exec p_qry 'syscolumns','id','colid','colid','name like ''s%'' 阅读全文
posted @ 2012-09-24 08:35 承志软件.张 阅读(477) 评论(0) 推荐(0)
SqlServer单文件附加方法
摘要:EXEC sp_attach_single_file_db 'dbname','绝对路径\dbname.mdf' 阅读全文
posted @ 2012-09-24 08:34 承志软件.张 阅读(218) 评论(0) 推荐(0)
取数据库MDF文件存储路径SQL语句
摘要:select filename from master.dbo.sysdatabases where lower(right(filename,3)) = 'mdf' 阅读全文
posted @ 2012-09-24 08:34 承志软件.张 阅读(217) 评论(0) 推荐(0)
转换数字为指定长度的字符串,前面补0 的SQL
摘要:use jktj_netright('00000'+cast(@count as varchar),5)--'00000'的个数为right函数的最后参数,例如这里是5,所以有5个0--@count就是被格式化的正整数--同时,给出个有趣的测试办法,在查询分析里运行就能看到结果declare @count intset @count = 0while (@count < 1000)beginprint right('0000000000'+cast(@count as varchar),10)set @count = @count +1en 阅读全文
posted @ 2012-09-24 08:32 承志软件.张 阅读(478) 评论(0) 推荐(0)
查看SQLServer的字符集编码
摘要:SELECT COLLATIONPROPERTY( 'chinese_prc_ci_as', 'codepage' )--查看代码页如果是936代表gbk 20936 代表gb2312 阅读全文
posted @ 2012-09-24 08:32 承志软件.张 阅读(1275) 评论(0) 推荐(0)
SQL Sqlserver怎么读写文件
摘要:1) DECLARE @object intDECLARE @hr intDECLARE @src varchar(255), @desc varchar(255)Declare @tmp intdeclare @msg varchar(3000)SET @msg='Hello. MS SQL Server 2000. I Love you!!!' --這字串將會被寫到SQL Server的安裝目錄下的Nipsan.Txt文件里面/* 取得SQL Server的安裝路徑*/declare @strPath nvarchar(512)Exec sp_MSGet_Setup_pat 阅读全文
posted @ 2012-09-24 08:30 承志软件.张 阅读(2682) 评论(0) 推荐(0)
SqlServer 取某个月的每一天
摘要:declare @ksrq datetimeset @ksrq='2011-2-1'select dateadd(d,a.number,@ksrq) as fDatefrom master..spt_values a where type = 'P' and dateadd(d,a.number,@ksrq) >= convert(varchar(7),@ksrq,120)+'-01'and dateadd(d,a.number,@ksrq) < convert(varchar(7),dateadd(mm,1,@ksrq),120)+ 阅读全文
posted @ 2012-09-24 08:25 承志软件.张 阅读(473) 评论(0) 推荐(0)
今天开通了博客园账号,庆祝一下,从明天开始和各位博友一起在博客园混了
摘要:从明天开始和各位博友一起在博客园混了 阅读全文
posted @ 2012-09-23 23:33 承志软件.张 阅读(124) 评论(0) 推荐(0)