|
| |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
/* author:amjn date:2003-03-28 version:1.0 function:替换text,ntext列中的字符串(不支持中文) */ declare @ptr varbinary(16) declare @amjnId int declare @Position int,@len int set @len=datalength(\\\'ILOVEHJL\\\') declare wux_Cursor scroll Cursor for select textptr([Name]),[amjnId] from USA201 for read only open wux_Cursor fetch next from wux_Cursor into @ptr,@amjnId while @@fetch_status=0 begin select @Position=patindex(\\\'%ILOVEHJL%\\\',[Name]) from USA201 where [amjnId]=@amjnId while @Position>0 begin set @Position=@Position-1 updatetext USA201.[Name] @ptr @Position @len \\\'i love hjl\\\' select @Position=patindex(\\\'%ILOVEHJL%\\\',[Name]) from USA201 where [amjnId]=@amjnId end fetch next from wux_Cursor into @ptr,@amjnId end close wux_cursor deallocate wux_cursor go 返回类别: 教程 上一教程: SQL中与IP相关的常见问题 下一教程: 小议MSSQL Server 2000的安全及治理 您可以阅读与"存储过程替换text,ntext列中的字符串"相关的教程: · 存储过程替换TEXT,NTEXT列中的字符串 · 使用SQL MAIL收发和自动处理邮件中的扩展存储过程简介 · 取得拼音字头的存储过程 · 存储过程编写经验和优化措施 · SQL SERVER存储过程/函数加/解密 |
| 快精灵印艺坊 版权所有 |
首页 |
||