应该没问题,可能是你的SERVER错了
解决方案 »
- 在SqlServer2008(查询)中,如何把同列同值的数据中,添加一个字段表示成第几行?
- 关于多表union all查询执行效率问题???
- 关于游标
- 请大家帮忙优化一条sql语句,合并查询
- 请问这样的一个"存储过程"该如何设计?
- 关于SQLServer数据库语句优化的问题
- 装了vs05和sql05,能再装sql2000吗
- 问下 sql 2005数据库中二进制字段的问题
- 查询一个月有几天.sql 语句 50分 先谢了
- SQL计算表中产品的到期月份,字段有失效时间,生效时间,我写的语句算出来的月份数不对,请指点
- 怎么修改VFP的狐狸头?
- flowerofwind(现实很残酷)在吗?有900分几乎就是为你量身定做的,请看看我的问题
去掉,可以执行。
我现在已经解决了。
open news_cur
--fetch next from news_cur into @id,@title
fetch next from news_cur into @id,@contentwhile @@fetch_status=0
begin
update news set content=replace(@content,'http://woaserver:8010/','/') where id=@id
--update news set title=@title where id=@id
--fetch next from news_cur into @id,@title
fetch next from news_cur into @id,@content
end deallocate news_cur这是更新后脚本代码
NO1、
declare news_cur cursor
for
select id from news
open news_cur
fetch next from news_cur into @idwhile @@fetch_status=0
begin
update news set content=replace(convert(varchar(5000),content),'http://woaserver:8010/','/') where id=@id
fetch next from news_cur into @id
end deallocate news_curNO2、
declare news_cur cursor
for
--select id,title from news
select id,convert(varchar(4000),content) from news
open news_cur
--fetch next from news_cur into @id,@title
fetch next from news_cur into @id,@contentwhile @@fetch_status=0
begin
update news set content=replace(@content,'http://woaserver:8010/','/') where id=@id
--update news set title=@title where id=@id
--fetch next from news_cur into @id,@title
fetch next from news_cur into @id,@content
end deallocate news_cur说明:第一段代码在sql7.0上运行正常,在sql2000上报错
第二段代码在sql2000上运行成功。
能够找出确实原因的,同样给分。