Tool Scripts
1. Function: 16进制转字符串
Create FUNCTION [dbo].[f_hextostr] (@hexstring VARCHAR(max))
RETURNS VARCHAR(max) AS begin
declare @char1 char(1), @char2 char(1), @strlen int, @currpos int, @result varchar(max)
set @strlen=len(@hexstring)
set @currpos=1
set @result=''
while @currpos<@strlen
begin
set @char1=substring(@hexstring,@currpos,1)
set @char2=substring(@hexstring,@currpos+1,1)
if (@char1 between '' and '' or @char1 between 'A' and 'F')
and (@char2 between '' and '' or @char2 between 'A' and 'F')
set @result=@result+
char((ascii(@char1)-case when @char1 between '' and '' then 48 else 55 end)*16+
ascii(@char2)-case when @char2 between '' and '' then 48 else 55 end)
set @currpos = @currpos+2
end
return @result
end
2. Function: 批量替换
Create Function [dbo].[RemoveCustomCharacters](@InitialString VarChar(8000), @Regex VarChar(8000), @ReplaceWith VarChar(8000))
Returns VarChar(8000)
AS
Begin
Declare @KeepValues as varchar(50)
Set @KeepValues = '%'+@Regex+'%'
While PatIndex(@KeepValues, @InitialString) > 0
Set @InitialString = Stuff(@InitialString, PatIndex(@KeepValues, @InitialString), 1, @ReplaceWith) Return @InitialString
End
3. 通过SQL语句读取文件
Select * From OpenRowSet(BULK N'FilePath', SINGLE_CLOB) As Content
Tool Scripts的更多相关文章
- [Robot Framework] 搭建Robot Framework和RIDE(Robot Framework GUI) 的环境
在windows x64的环境上进行安装,集成Selenium2和AutoIt的libraries,以下安装步骤在win 7,win 8.1,win 10, win 2012 R2上测试通过 1. 下 ...
- Robot Framework 搭建和RIDE(GUI) 的环境
在windows x64的环境上进行安装,集成Selenium2和AutoIt的libraries,以下安装步骤在win 7,win 8.1,win 10, win 2012 R2上测试通过 1. 下 ...
- Java 7 jps - JVM Process Status Tool
本文内容 语法 参数 描述 选项 主机标识符 输出格式 示例 参考资料 先发出来,然后慢慢翻译~ 语法 jps [ options ] [ hostid ] 参数 options 命令行参数. hos ...
- Java 7 jstat – JVM Statistics Monitoring Tool【翻译】
原文地址:Java 7 jstat 本文内容 语法 参数 描述 虚拟机标识符 选项 一般选项 输出选项 示例 先发出来,然后慢慢翻译~ 语法 jstat [ generalOption | outpu ...
- Free Slideshow, Gallery And Lightboxes Scripts
http://bootstraphelpers.codeplex.com/SourceControl/list/changesets https://github.com/gordon-matt/Bo ...
- chrome developer tool 调试技巧
这篇文章是根据目前 chrome 稳定版(19.0.1084.52 m)写的, 因为 google 也在不断完善chrome developer tool, 所以 chrome 版本不同可能稍有差别. ...
- Falcon Genome Assembly Tool Kit Manual
Falcon Falcon: a set of tools for fast aligning long reads for consensus and assembly The Falcon too ...
- Scott Hanselman's 2014 Ultimate Developer and Power Users Tool List for Windows -摘自网络
Everyone collects utilities, and most folks have a list of a few that they feel are indispensable. ...
- chrome developer tool 调试技巧2
我大概是从 08.09 年从 Firebug 转入 Chrome Developer Tool,一直用到现在,越用越喜欢.我平时调错时常用的功能有: 代码格式化可以将被压缩的代码自动展开 实时代码编辑 ...
随机推荐
- Mysql内置功能《五》 函数
一 函数 MySQL中提供了许多内置函数,例如: 一.数学函数 ROUND(x,y) 返回参数x的四舍五入的有y位小数的值 RAND() 返回0到1内的随机值,可以通过提供一个参数(种子)使RAND( ...
- 关键字的使用 pass break continue
# ### 关键字的使用 # (1)pass 过 作用 作站位用的 if 5==5: pass i = 0 while i <5: pass #约定俗成,在循环里面什么也不行的情况下,给友好提示 ...
- 【转】C#具名参数和可选参数
源地址:https://www.cnblogs.com/similar/p/5006705.html 另:可选参数的一个陷阱 参考:https://www.cnblogs.com/still-wind ...
- 为什么int类型的数据可以存储超过9999?
int占4字节,4*8=32位,10进制取值范围为 (-2^31-1)~(2^31-1):-2147483648~2147483647 package test; public class test1 ...
- Ubuntu16.04装机后处理
1.卸载软件 #卸载libreOffice sudo apt remove libreoffice-common #卸载amazon sudo apt remove unity-webapps-com ...
- TX2 五种功耗模式
工作模式介绍 Jetson TX2由一个GPU和一个CPU集群组成,CPU集群由双核丹佛2处理器和四核ARM Cortex-A57组成,通过高性能互连架构连接. 拥有6个CPU核心和一个GPU,您可以 ...
- Maven环境下面多项目之间的引用
如图: https://github.com/sdl/odata-example sdl OData例子包含了4个项目,下载到本地后编译.发现只有model项目是可以编译过去了.其他几个暂时编译不过 ...
- 获取指定<文字行数>的<高度>是多少 TextKit
- (CGSize)maxLineSizeWithLines:(NSInteger)lines constraintSize:(CGSize)size attributes:(NSDictionary ...
- editplus 编辑 php双击选中变量问题
windows下,在很多地方双击鼠标左键可以选中一个连续的英文字符串. 在editplus 编辑器里可以双击选中一个变量,方便了编程,但是使用phptools(php.stx)增强语法插件后,在一个变 ...
- head first
1, insert 单引号时,使用/转义 2, 不要用NULL, 查找时使用isNull 来判断. 3, 用and / or 连接两个not 时,要写两个NOT 4,delete from tab ...