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)
修改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)
生成交叉表的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)
SqlServer单文件附加方法
摘要:EXEC sp_attach_single_file_db 'dbname','绝对路径\dbname.mdf'
阅读全文
posted @
2012-09-24 08:34
承志软件.张
阅读(218)
推荐(0)
取数据库MDF文件存储路径SQL语句
摘要:select filename from master.dbo.sysdatabases where lower(right(filename,3)) = 'mdf'
阅读全文
posted @
2012-09-24 08:34
承志软件.张
阅读(217)
推荐(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)
查看SQLServer的字符集编码
摘要:SELECT COLLATIONPROPERTY( 'chinese_prc_ci_as', 'codepage' )--查看代码页如果是936代表gbk 20936 代表gb2312
阅读全文
posted @
2012-09-24 08:32
承志软件.张
阅读(1275)
推荐(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)
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)