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

推荐订阅源

雷峰网
雷峰网
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
Microsoft Security Blog
Microsoft Security Blog
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
U
Unit 42
IT之家
IT之家
D
DataBreaches.Net
Y
Y Combinator Blog
B
Blog RSS Feed
F
Fortinet All Blogs
GbyAI
GbyAI
V
Visual Studio Blog
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
美团技术团队
L
LangChain Blog
N
Netflix TechBlog - Medium
G
Google Developers Blog
Recent Announcements
Recent Announcements
T
Tailwind CSS Blog

博客园 - Wintle

招聘需求分析师(RA) 整理一下提供的下载 好久没有写这里的Blog了。 www.codeplus.net备案成功,网站重新开通! www.codeplus.net 由于正在进行备案,所以目前无法访问。 [更新] CodePlus V2.0 提供对 oracle 支持 - Wintle 发布无限制版CodePlusV2.0,致歉,并回复所有来信的朋友 [解决问题]asp.net程序编译调试时偶尔出现访问被拒绝的错误 - Wintle - 博客园 CodePlusV2.0推出半个月,下载量已超过1万,今天你用CodePlus了吗? CodePlus V2.0 的一些更新 (2005-9-6) CodePlus v2.0 又修正了一个bug - Wintle CodePlus 代码生成器 V2.0 最近更新 (2005-8-30) CodePlus 代码生成器 V2.0 新鲜出炉,请大家下载使用 黄天不负有心人,终于全身而退,哈哈 Contact.Net 更新 改名浅屋 用sqlite3数据库做了一个个人关系管理软件:) SQL SERVER 数据库的同库不同版本间的比较程序 离开了自己很久,终于在之前决心回来。
替换表中所有null为"无"的sql
Wintle · 2005-08-20 · via 博客园 - Wintle

Posted on 2005-08-20 16:59  Wintle  阅读(1191)  评论(0)    收藏  举报

先放一放。呵呵。

declare @newstr varchar(100)
set @newstr=''  --新字符

declare @table varchar(256)
set @table='year2004'  --

declare @upcol varchar(8000)
declare tb cursor local for
select upcol='update ['+b.name+'] set ['+a.name+']='''+@newstr+''' where ['+a.name+'] is null'
from syscolumns a join sysobjects b on a.id=b.id
where b.xtype='U' and a.status>=0
 
and a.xusertype in(175,239,231,167and b.name=@table
open tb
fetch next from tb into @upcol
while @@fetch_status=0
begin
 
exec(@upcol)
 
fetch next from tb into @upcol
end
close tb
deallocate tb