declare @CompanyName varchar(360)
declare @Address    varchar(600)
declare @LinkMan    varchar(120)
declare @Tel    varchar(64)
declare @Mobile    varchar(64)
declare @Fax    varchar(120)
declare democursor cursor

for
select CompanyName,Address,LinkMan,Tel,Mobile,Fax from Company
open democursor
fetch next from democursor into @CompanyName,@Address,@LinkMan,@Tel,@Mobile,@Fax

while @@FETCH_STATUS=0

begin

print 'update Companyinfo set CompanyAdderss='''+@Address+''',PAddress='''+@Address+''',PTel='''+@Tel+''',PPhone='''+@Tel+''',PMobile='''+@Mobile+''',PFax='''+@Fax+''' where CompanyName='''+@CompanyName+''' and PTel is null'
fetch next from democursor into @CompanyName,@Address,@LinkMan,@Tel,@Mobile,@Fax

end

close democursor
deallocate   democursor

posted on 2009-03-03 10:22 sanmao 阅读(41) 评论(0)  编辑  收藏

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


网站导航:
 

常用链接

留言簿(5)

随笔分类

随笔档案

搜索

  •  

最新评论

阅读排行榜

评论排行榜