MSSQL首字母替换成大写字母
mssql 首字母 大写字母 替换成
2023-06-13 09:14:12 时间
--使用程序块
-->Title:生成?y???
-->Author:wufeng4552
-->Date:2009-09-2113:40:59
declare@svarchar(8000)
set@s=lower(@@version)
select@s
/*
microsoftsqlserver2005-9.00.4035.00(intelx86)
nov24200813:01:59
copyright(c)1988-2005microsoftcorporation
enterpriseeditiononwindowsnt5.2(build3790:servicepack2)
(1???料列受到影?)
*/
declare@iint,@jint
select@i=1,@j=len(@j)
whilecharindex("",""+@s,@i)>0
begin
set@I=charindex("",""+@s,@i)+1
if@i>@jcontinue
set@s=stuff(@s,@i-1,1,upper(substring(@s,@i-1,1)))
end
select@s
/*
MicrosoftSqlServer2005-9.00.4035.00(intelX86)
nov24200813:01:59
copyright(c)1988-2005MicrosoftCorporation
enterpriseEditionOnWindowsNt5.2(build3790:ServicePack2)
(1???料列受到影?)
*/
----使用函数
-->Title:生成?y???
-->Author:wufeng4552
-->Date:2009-09-2113:40:59
ifobject_id("F_split")isnotnulldropfunctiondbo.F_split
go
createfunctionF_split(@snvarchar(1000))
returnsnvarchar(1000)
as
begin
declare@strnvarchar(1000),@splitnvarchar(100)
select@s=@s+"",@str=""
whilecharindex("",@s)>0
begin
set@split=left(@s,charindex("",@s))
set@str=@str+upper(left(@split,1))+right(@split,len(@split))
set@s=stuff(@s,1,charindex(char(32),@s),"")
end
return@str
end
go
declare@svarchar(1000)
set@s=lower(@@version)
selectdbo.F_split(@s)
/*
MicrosoftSqlServer2005-9.00.4035.00(intelX86)
nov24200813:01:59
copyright(c)1988-2005MicrosoftCorporation
enterpriseEditionOnWindowsNt5.2(build3790:ServicePack2)
*/
--3借住系?表,或??r表
-->Title:生成?y???
-->Author:wufeng4552
-->Date:2009-09-2113:40:59
declare@strvarchar(1000)
select@str=char(32)+lower(@@version)
select@str=replace(@str,char(32)+char(number),char(32)+char(number))
frommaster..spt_values
wheretype="p"andnumberbetween65and90
selectstuff(@str,1,1,"")
/*
MicrosoftSqlServer2005-9.00.4035.00(intelX86)
nov24200813:01:59
copyright(c)1988-2005MicrosoftCorporation
enterpriseEditionOnWindowsNt5.2(build3790:ServicePack2)
(1???料列受到影?)
*/
-->Title:生成?y???
-->Author:wufeng4552
-->Date:2009-09-2113:40:59
declare@svarchar(8000)
set@s=lower(@@version)
select@s
/*
microsoftsqlserver2005-9.00.4035.00(intelx86)
nov24200813:01:59
copyright(c)1988-2005microsoftcorporation
enterpriseeditiononwindowsnt5.2(build3790:servicepack2)
(1???料列受到影?)
*/
declare@iint,@jint
select@i=1,@j=len(@j)
whilecharindex("",""+@s,@i)>0
begin
set@I=charindex("",""+@s,@i)+1
if@i>@jcontinue
set@s=stuff(@s,@i-1,1,upper(substring(@s,@i-1,1)))
end
select@s
/*
MicrosoftSqlServer2005-9.00.4035.00(intelX86)
nov24200813:01:59
copyright(c)1988-2005MicrosoftCorporation
enterpriseEditionOnWindowsNt5.2(build3790:ServicePack2)
(1???料列受到影?)
*/
----使用函数
-->Title:生成?y???
-->Author:wufeng4552
-->Date:2009-09-2113:40:59
ifobject_id("F_split")isnotnulldropfunctiondbo.F_split
go
createfunctionF_split(@snvarchar(1000))
returnsnvarchar(1000)
as
begin
declare@strnvarchar(1000),@splitnvarchar(100)
select@s=@s+"",@str=""
whilecharindex("",@s)>0
begin
set@split=left(@s,charindex("",@s))
set@str=@str+upper(left(@split,1))+right(@split,len(@split))
set@s=stuff(@s,1,charindex(char(32),@s),"")
end
return@str
end
go
declare@svarchar(1000)
set@s=lower(@@version)
selectdbo.F_split(@s)
/*
MicrosoftSqlServer2005-9.00.4035.00(intelX86)
nov24200813:01:59
copyright(c)1988-2005MicrosoftCorporation
enterpriseEditionOnWindowsNt5.2(build3790:ServicePack2)
*/
--3借住系?表,或??r表
-->Title:生成?y???
-->Author:wufeng4552
-->Date:2009-09-2113:40:59
declare@strvarchar(1000)
select@str=char(32)+lower(@@version)
select@str=replace(@str,char(32)+char(number),char(32)+char(number))
frommaster..spt_values
wheretype="p"andnumberbetween65and90
selectstuff(@str,1,1,"")
/*
MicrosoftSqlServer2005-9.00.4035.00(intelX86)
nov24200813:01:59
copyright(c)1988-2005MicrosoftCorporation
enterpriseEditionOnWindowsNt5.2(build3790:ServicePack2)
(1???料列受到影?)
*/
相关文章
- 经验分享 | mssql注入实战总结之狠快准绕
- 用MSSQL最佳工具优化数据库管理(mssql利用工具)
- 存储过程:MSSQL 数据库的强大功能(存储过程mssql)
- MSSQL:如何删除重复数据(mssql删除重复数据)
- 比较MSSQL和Access数据库:哪个更适合你的业务需求?(mssql和access)
- mssql服务器角色:合理分配,提升企业运行稳定性(服务器角色 mssql)
- 排查MSSQL:解决无法启动程序的挑战(无法启动程序 mssql)
- 数据库安全:MSSQL的密码策略(数据库密码策略mssql)
- MSSQL数据回滚技术指南(数据回滚mssql)
- 异速联与本地MSSQL的无缝整合(异速联 本地mssql)
- 使用SQL Server导出数据库记录(导出mssql数据库)
- 使用调整MSSQL内存,减少系统性能开销(减少mssql内存)
- 关闭MSSQL服务器的正确姿势(关闭mssql)
- 先装MSSQL还是VS?——程序员的困境(先装mssql还是VS)
- 上万台MSSQL服务器,构建强大的数据库基础设施(上万台mssql服务器)
- MSSQL数据库版本降低之备份策略(mssql降低备份版本)
- 快速配置MSSQL服务器的配置文件(mssql 配置文件)
- MSSQL数据库部分索引优化实践(mssql部分数据索引)
- MSSQL远程登录失败的解决办法(mssql远程登录不了)
- 管理基于MSSQL触发器的库存管理系统构建(mssql触发器 库存)
- MSSQL中表的赋值操作简介(mssql 表赋值)
- MSSQL中使用行变量的简易操作方法(mssql 行变量)
- MSSQL中联合主键的应用与优势(mssql 联合主键)
- MSSQL查询实现月度销售额累计(mssql 累计月销售量)
- MSSQL索引1越界:谨防灾难性后果(mssql索引1超出范围)
- 崩溃报错:MSSQL 目录名无效(mssql 目录名无效)
- MSSQL登录注入:一种被数据安全威胁的例子(mssql 登陆注入)
- MSSQL 迅速生成可行的文档方案(mssql 生成文档)
- 使用 MSSQL 技术给你的数据添加唯一编号(mssql 生成唯一编号)
- MSSQL连接:用锐浪报表助力企业数据分析(锐浪报表mssql连接)
- 实现一台服务器多个mssql实例部署(装了多个mssql实例)