摘要: 给table新增水平滚动条 序号 地市 区县 门店名称 对应直供客户名称 虚拟账号 门店负责人 联系方... 阅读全文
posted @ 2014-12-31 16:12 Adam_Li 阅读(1628) 评论(0) 推荐(0) 编辑
摘要: CREATE FUNCTION [dbo].[f_Removezimuhanzishuzi] ( @str VARCHAR(500) ) RETURNS VARCHAR(500) AS BEGIN -- '%[1-9]%' 所有數字 -- '%[A... 阅读全文
posted @ 2014-12-31 16:11 Adam_Li 阅读(5480) 评论(0) 推荐(0) 编辑
摘要: --生成随机编号的函数CREATE FUNCTION [dbo].[f_RANDBH](@BHLen int)RETURNS varchar(50)ASBEGIN DECLARE @r varchar(50) IF NOT(ISNULL(@BHLen,0) BETWEEN 1 AND 50) SE... 阅读全文
posted @ 2014-12-31 16:10 Adam_Li 阅读(1269) 评论(0) 推荐(0) 编辑
摘要: create proc sp_backupdatabase@bak_path nvarchar(4000)='' --备份路径;,@baktype int = null --备份类型为全备,1为差异备,2为日志备份,@type int = null ... 阅读全文
posted @ 2014-12-31 16:09 Adam_Li 阅读(243) 评论(0) 推荐(0) 编辑
摘要: ---------------------------------------------------------------------------------- -- Author : htl258(Tony) -- Date : 2010-06-25 22:23:18 -- Version... 阅读全文
posted @ 2014-12-31 16:08 Adam_Li 阅读(801) 评论(0) 推荐(0) 编辑
摘要: --更新序号,最大值+1的方式自增DECLARE @maxvalue INT SELECT @maxvalue=ISNULL(MAX(SEQUENCE),0) FROM TBL_MMDM WHERE TYPE='Product Category'UPDATE TBL_MMDM SET ... 阅读全文
posted @ 2014-12-31 16:07 Adam_Li 阅读(813) 评论(0) 推荐(0) 编辑
摘要: with cte as( select groupname,GroupId from Sys_Group where GroupId in( select ReleaseRangeId from Sys_Notice_Permission where ReleaseRangeType=2 and N... 阅读全文
posted @ 2014-12-31 16:04 Adam_Li 阅读(664) 评论(0) 推荐(0) 编辑
摘要: --查询死锁select request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName from sys.dm_tran_locks where resource_type='OBJECT'--删除死锁dec... 阅读全文
posted @ 2014-12-31 16:03 Adam_Li 阅读(938) 评论(0) 推荐(0) 编辑
摘要: CREATE PROCEDURE [dbo].[ReplaceSameStr]@str varchar(8000)ASdeclare @ret varchar(8000),@return varchar(8000) select @str = @str select @str = @str+... 阅读全文
posted @ 2014-12-31 16:01 Adam_Li 阅读(875) 评论(0) 推荐(0) 编辑