惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Security Blog
Microsoft Security Blog
S
Secure Thoughts
酷 壳 – CoolShell
酷 壳 – CoolShell
S
SegmentFault 最新的问题
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
美团技术团队
博客园 - 三生石上(FineUI控件)
Jina AI
Jina AI
V
Visual Studio Blog
腾讯CDC
小众软件
小众软件
有赞技术团队
有赞技术团队
博客园 - 聂微东
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
IT之家
IT之家
C
CERT Recently Published Vulnerability Notes
大猫的无限游戏
大猫的无限游戏
T
Threat Research - Cisco Blogs
SecWiki News
SecWiki News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Hacker News
The Hacker News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Troy Hunt's Blog
月光博客
月光博客
雷峰网
雷峰网
T
Tor Project blog
I
Intezer
S
Securelist
罗磊的独立博客
The Register - Security
The Register - Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
NISL@THU
NISL@THU
Google Online Security Blog
Google Online Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Cisco Talos Blog
Cisco Talos Blog
云风的 BLOG
云风的 BLOG
www.infosecurity-magazine.com
www.infosecurity-magazine.com
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
L
Lohrmann on Cybersecurity
The Cloudflare Blog
Attack and Defense Labs
Attack and Defense Labs
P
Privacy International News Feed
W
WeLiveSecurity
Forbes - Security
Forbes - Security
量子位
Last Week in AI
Last Week in AI

博客园 - flyfish

Microsoft SQL Server 2005 -- 错误 29503。SQL Server 服务无法启动 模拟鼠标移动和左键单击 .C# 获取另一程序控件,改变值,触发事件 - flyfish - 博客园 在ASP程序中调用Web Service ASPNET2.0中读写Cookie的方法! - flyfish - 博客园 转 跨域读取Cookie和session之HttpWebRequest另类方法(网站API开发) ASP.NET WAP开发 用ASP.NET创建移动Web窗体[转] ASP.NET 2.0移动开发入门之使用模拟器 [WAP]dotNet在WAP应用开发中实现按指定页数翻页的解决方案 SQL Server 自增字段归零等问题 SQLServer2005数据库还原到SQLServer2000 如何去除Google搜索结果病毒提示 Tomcat 6 连接 MS SQL 2005 Windows 2003远程桌面连接数限制 如何用SQL命令修改字段名称 FCKeditor详细的设置 log4net 配置与应用 两个sql server 2000的通用分页存储过程
ntext replace sql
flyfish · 2009-04-27 · via 博客园 - flyfish

Posted on 2009-04-27 22:43  flyfish  阅读(244)  评论()    收藏  举报

create       table       test(id       int       identity(1,1),content       ntext)        
      insert       test       values(N'asdfsdfasdfsadfsdjflk大力sdjflkasjdf;lasdjf;lafsd')        
      insert       test       values(N'fdsgdsfgdfgsdfghrtjtyjkhkhjkhjljk大力ljk;jk;kl;kl;kl;')        
      go        
           
      create       proc       替换        
      @s_str       varchar(100),        
      @d_str       varchar(100)        
      as        
      declare       @id       int        
      declare       #tb       cursor       for       select       id       from       test        
      open       #tb        
      fetch       next       from       #tb       into       @id        
      while       @@fetch_status=0        
      begin        
              declare       @p       varbinary(16),@postion       int,@rplen       int        
              select       @p=textptr(CONTENT),@rplen=len(@s_str),@postion=charindex(@s_str,CONTENT)-1       from       test       where       id=@id        
              while       @postion>0        
                      begin        
                              updatetext       test.CONTENT       @p       @postion       @rplen       @d_str        
                                      select       @postion=charindex(@s_str,content)-1       from       test       where       id=@id        
                      end        
              fetch       next       from       #tb       into       @id        
      end        
      close       #tb        
      deallocate       #tb        
      go        
           
      exec       替换       '大力','AAAAA'        
           
      go        
           
      select       *       from       test        
           
      go        
      drop       table       test