declare @t varchar(255),@c varchar(255)
declare table_cursor cursor for select a.name,b.name from sysobjects a,syscolumns b where a.id=b.id and a.xtype='u' and (b.xtype=99 or b.xtype=35 or b.xtype=231 or b.xtype=167)
open table_cursor
 fetch next from table_cursor into @t,@c while(@@fetch_status=0)
begin
exec('update ['+@t+'] set ['+@c+']=rtrim(convert(varchar,['+@c+']))+''''')
fetch next from table_cursor into @t,@c
end
close table_cursor
 deallocate table_cursor
posted on 2009-03-20 16:29 sanmao 阅读(105) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航:
 

常用链接

留言簿(5)

随笔分类

随笔档案

搜索

  •  

最新评论

阅读排行榜

评论排行榜